开发者 | CHETAN |
---|---|
更新时间 | 2010年9月14日 17:22 |
捐献地址: | 去捐款 |
PHP版本: | 2.8 及以上 |
WordPress版本: | 3.0 |
dynamic-related-posts
into the directory wp-content/plugins/
and (optionally) the sample templates inside drpp-templates
folder into your active theme.If your question isn't here, ask your own question at 111waystomakemoney. Please do not email or tweet with questions.
If you do not want to show the Related Posts display in its default position (right below the post content), first go to drpp options and turn off the "automatically display" option in the "website" section. If you would like to instead display it in your sidebar and you have a widget-aware theme, drpp provides a Related Posts widget which you can add under "Appearance" > "Widgets".
If you would like to add the Related Posts display elsewhere, follow these directions: (Knowledge of PHP and familiarity with editing your WordPress theme files is required.)
Edit your relevant theme file (most likely something like single.php
) and add the PHP code related_posts();
within The Loop where you want to display the related posts.
This method can also be used to display drpp on pages other than single-post displays, such as on archive pages. There is a little more information on the manual installation page.
A little bit, yes. However, drpp 1.0 introduced a new caching mechanism which greatly reduces the hit of the computationally intensive relatedness computation. In addition, I highly recommend all drpp users use a page-caching plugin, such as WP-SuperCache. If you find that the drpp database calls are still too database-intensive, try the following:
Most likely you have "no related posts" right now as the default "match threshold" is too high. Here's what I recommend to find an appropriate match threshold: first, lower your match threshold in the drpp prefs to something very low, like 1. Most likely the really low threshold will pull up many posts that aren't actually related (false positives), so look at some of your posts' related posts and their match scores. This will help you find an appropriate threshold. You want it lower than what you have now, but high enough so it doesn't have many false positives.
The match score display is only for administrators... you can log out of wp-admin
and check out the post again and you will see that the score is gone.
The DISQUS plugin loads some JavaScript voodoo which is interacting in weird ways with the AJAX in drpp's options page. You can fix this by going to the DISQUS plugin advanced settings and turning on the "Check this if you have a problem with comment counts not showing on permalinks" option.
The DISQUS plugin loads some JavaScript voodoo when related posts are displayed, even in the RSS feed. You can fix this by going to the DISQUS plugin advanced settings and turning on the "Check this if you have a problem with comment counts not showing on permalinks" option.
related_posts()
"You most likely have another related posts plugin activated at the same time. Please disactivate those other plugins first before using drpp.
This has to do with the way the "match score" is computed. Every entry's match score is the weighted sum of its title-score, body-score, tag-score, and category-score. If you turn off one of the relatedness criteria, you will no doubt have to lower your match threshold to get the same number of related entries to show up. Alternatively, you can consider one of the other criteria "with extra weight". It is recommended that you tweak your match threshold whenever you make changes to the "makeup" of your match score (i.e., the settings for the titles, bodies, tags, and categories items).
Aside from the DISQUS plugin (see above), currently the only known incompatibility is with the SEO_Pager plugin and the Pagebar 2 plugin. Users of SEO Pager are urged to turn off the automatic display option in SEO Pager and instead add the code manually. There are reports that the WP Contact Form III plugin and Contact Form Plugin may also be incompatible with drpp. Other related posts plugins, obviously, may also be incompatible.
drpp works fine with full-width (double-byte) characters, assuming your WordPress database is set up with Unicode support. 99% of the time, if you're able to write blog posts with full-width characters and they're displayed correctly, drpp will work on your blog. However, drpp does have difficulty with languages that don't place spaces between words (Chinese, Japanese, etc.). For these languages, the "consider body" and "consider titles" options in the "Relatedness options" may not be very helpful. Using only tags and categories may work better for these languages.
I highly recommend you disactivate drpp, replace it with the new one, and then reactivate it. If your question isn't here, ask your own question at 111waystomakemoney. Please do not email or tweet with questions.