WordPress Related Posts Plugin
10.08.2009 by Denis - 72 CommentsPosted in Plugin
WordPress Related Posts Plugin generates related posts via the WordPress tags. It then adds the related posts to a feed which can, among things, be displayed at the bottom of all your posts. It will help keep people on your site for longer, and get more of your content viewed.
Installation and Usage:
- Upload the WPRP folder to the /wp-content/plugins/ directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Place <?php wp_related_posts(); ?> in your templates
- Navigate to Manage Panel > Setting > WordPress Related Posts to configure plugin output.
Download: WordPress Related Posts
Please donate via payapl to support the plugin’s development. 

I think it is better than All in One SEO.
They are types
that’s a great plugin, it can show the related posts in your page, and activate the reader to read more….
Thanks for share, back after taste.
Place in your templates
exactly how this is done?
edit single.php,
find the_content(); function,
paste <?php wp_related_posts(); ?> after it.
I finally found the the_content(); function and paste after it but then I got:
Fatal error: Call to undefined function wp_related_posts() in /homepages/../single.php on line 11
How to correct this error?
Thanks.
OK, I found the error source. Actually I have other Related Post plugin and that was the one that I activated and causing the error.
But still can’t make it work. What I got is ‘No related posts’.
Hello,
For me don t work, is showing only the title with link, no image
Hi,
I am having trouble getting the image to show. How do I create a custom field to associate my thumbnails?
Thanks so much,
debbie
the image function only for the advanced use which have set thumbnail image for every post!
I’m having trouble on one of my sites with the plug-in showing only a line of text(the titles of related posts) in the RSS feed and not the list of related links. The only difference in the site from another that does work is that I have removed the php content command from the single post template.
Any suggestions?
I figured it out. The content value cannot be null (“”) as long as there is some value, I used a space then the plugin works fin with the RSS feed.
sorry, I can’t follow you… can you contact me via MSN denishua#hotmail.com
Newbie question, but how can I change the font color of the hyperlinks.
I am using related posts without thumbnails.
Thank you
I have 10 related posts display, but want to split it up in 2 columns, 5 posts left, and 5 right, does anyone know how to accomplish this please?
Great plugin! Thanks!
But I have a problem. Why Random Posts are shown twice under my post? I guess I have no related posts at the moment, is that the reason??
ok, I found out that I should not checkmark
- Auto Insert Related Posts? in the plugin settings.
Now it shows as needed, I also added related tags to have Related Posts underneath.
But another problem occured! There are no Random Posts now under the Related Posts??
Great plugin!! Thanks a lot for developing it.
Could you please tell me how to change the font color of the “Related Posts Title” and the hyperlinks?
Thanks!
SaSh
Great plugin! Thanks!
is there a way of customizing this plugin? In the settings for the plugin you can exclude categories, but I want to embed this plugin in different places with each version excluding different categories, can i do this with a parameter passed into wp_related_posts ?
I’d also like more info around the thumbnail, I am using p75 simple thumbnail plugin, is it possible to use these are thumbnails for related posts?
Thank you! Great plugin!
how can i do it with categories instead tags?
simple but powerfull plugin! i’ll tried this plugin adapt to page which have subpages, but it’s hard for me to do
maybe you can help?
I just want to share this piece of css so you can have a nice related post layout with thumbnails. Hope it helps! and thanks for this great plugin!
Paste it on your style.css
.related_post a:link {border:none; color:#666666;}
.related_post {clear:both; text-align:left; margin:10px 0px 0px 0px; padding:0;}
.related_post li{width:120px; float:left; display:inline; margin-top:5px; margin-right:13px; margin-left:10px; padding:5;}
.related_post img{width:120px; height:70px;clear:both; padding:5px; background:#F7F7F7; border:1px solid #DDD;}
.related_post img:hover {border: 1px solid #000;padding:5px;}
.related_post a{clear:both; display:block; border:none; text-decoration:none;}
.related_post li{font-size:11px;}
.related_post li a:hover {color: #000;}
Thanks Greg
I was trying to do this myself but was quite unsuccessful – your tip works perfectly
i want to change the font style to match my post title, i tried:
font-family:’palatino linotype’,palatino,’times new roman’,times,serif;
and this just not change. i change the color and size of the font,
so i know im the correct area of the style sheet.
any ideas?
Does anybody know how to set a default image incase there is no thumbnail? For instance when there is only a video in the post?
Maybe using a jpeg image as a preview of your embedded video ?
Great plug-in ! A little bit tricky to figure out for non-code guys
But when there is no related posts, It could be nice to display nothing – even the Related Post area – instead of a message “There is is no RP” or most commented/most popular posts.
I try to do that with CSS property “display: none;” because I’m unable to get into PhP without damage…
Does anyone knows the trick ?
thnx a lot for this plugin,m goin to use this in my nu theme
hi I am not able to display the image in the related post section. I am using WP 2.9.1
I’m still confuse, I try to install this plugin but my themes broken why i don’t know, whats wrong?
I already paste after the_content(); function,
on my single.php
but only No Related Post is appear
no posted related was appear
this is my blog http://www.kasurexo.co.cc
help me plase…..
When I pasted after the_content(); function on my single.php, I got two entries with No Related Post. I deleted that line in my single.php, now I got one No Related Post. Don’t know though how to make the related posts to appear there.
OK, I went to change the ‘No Related Post’ into ‘Most Commented Posts’ and you can see the results here:
http://www.atanone.net/is-the-ftc-planning-to-sue-bloggers/
Once you click on any of that link, it will show Related Posts.
Please see if that works for you and let us know.
Good luck, and thanks Denis for nice plugin.
I already paste after the_content(); function,
on my single.php
but only No Related Post is appear
no posted related was appear
this is my blog http://www.kasurexo.co.cc
help me plase…..
hi i was using YARPP earlier but that is cruel for processor usage over shared hosting; resulting in suspension of my blog. Now i am in search of a plugin which is easy on db and doesnt give much load. How abt WPRP?
please help, my posts are showing MASSIVE thumbnails. I was hoping they would show the related and random posts as small thumbnails.
my site is http://www.bulkhogan.com
please take a look. when i uploaded the pics and tagged them in i selected “thumbnail”
thank you. am i gonna have to manually make thumbnails on this?
Where did you put it? I didn’t see it there.
Don’t select the thumbnail and it works fine like in my site:
http://www.atanone.net/blueberries-studies-and-my-daughter/
Please help. I am embarrassingly new. I have uploaded and activated the plug in but am struggling with the part where I have to Place in your templates.
I am not very sure whether I should be able to do this from the dashboard or the hosting site.
I could not find this mentioned in an earlier post
edit single.php,
find the_content(); function,
paste after it.
I am using Thesis 1.7 and the latest edition of word press
Thanks for this plugin.Works like a charm
Would be great if you could grab the images from the post or database with out having to check a custom field !
It works all except random posts, it doesn’t show a thing.
I can’t get working the exclude when I use “Display: Random Posts”.
Any idea? Thanks for help.
How exactly is the Exclude (Category IDs) supposed to work. Nothing I am doing is working. Give an example using more than one post to exclude. Write it out:
Say my category is 27 and my post numbers I want to exclude is 238 and 345….how do I write this in the box so that it works?
27,238, 27,345 or what? I tried it different ways. Going to have to shut down related posts completely if this will not work.
Thanks.
Hi Denis,
I’ve been using your plugin for a week or so, and it’s been working well, but now I have a problem. For some reason, when I log into Wordpress and click “Edit” under “Posts” in the left-hand menu, I get a blank page. The page simply will not load, so I can’t see my list of posts to edit them.
To find out if one of my plugins was causing this problem, I deactivated your Related Posts plugin. Doing this immediately allowed me to view my list of posts on the Edit page, but it also caused everything in my sidebar to diappear, and it gave me this error at the bottom of the first post on the page, where my “related posts” are supposed to be listed:
Fatal error: Call to undefined function: wp_related_posts() in /homepages/8/d311697663/htdocs/wp-content/plugins/thesis-openhook/functions.php(453) : eval()’d code on line 1
My theme is Thesis 1.7 and I am running on Wordpress 2.9.1. As you can see from the error message above, I’m also using the OpenHook plugin. If you could help me in any way, I would be very grateful!
Hi I’m currently trying to fix the same problem as you Amanda (or almost identical because I’m using a different theme). Please let me know if you find a work around. I’m going to try and manually reinstall the plugin files into the directory WP is expecting them to be in for now.
Nice plugin. Works really nicely.
Thanks
My client is using Wordpress version 2.5.1 and I cannot see the Save button on the configuration page.
i really had a difficult time figuring out the thumbnail images for this, but after a few minutes of really nosing around my dashboard, discovered how to do it.
the process involves having a picture related to your post and using the posts “custom field” to display it. i also used the styling from Greg’s comment on this page.
create the thumbnail – -
you don’t necessarily need to create this thumb if you already have an image in your post, on the server. let’s say your post is about candy and you have a pic of a sucker on your blog, right click on it, view image. you’ll see the pic appear in a new window. copy the url.
custom field – - –
go into your Edit Posts page within WP and scroll down just a bit till you see a section called “Custom Fields”. you’ll see “name” and “value”.
Enter New.
Name = I used the word THUMBNAIL.
Value – paste the url from the step above.
hit the Add Custom Field button.
when it comes together, it looks pretty sweet! enjoy! it’s a very good plug-in!
Any ideas on how to display related posts based on custom taxonomies? For example:
Book related posts use its own custom category, for example “Book”.
Book related posts also use its own custom tag, for example “book tag”.
I only want book categorized posts to display related posts with “book tags”.
Is that possible? Thanks.
Great plugin. Thank you so much. Only thing I can think of that I’d really appreciate would be if you could add classes to the image and text links, as I would like to apply different styles to each.
So the anchor with the thumb gets a class “related_post_thumb” and the anchor with the text gets a class “related_post_link”. This would make it possible to add a background color to the text, but leave the image as it is. At the moment if you add a style to ‘.related_post a’ it applies it to both.
Dears,
I’ve installed the plugin and it works just fine!
But I two small issues that I can not solve:
1) the settings page does not show a button to save changes, or a “ok” button. So, I can not confirm changes I want to make in the settings.
2) when I call the plugin in my sidebar, it works fine too, but the title of each post shown goes just one below each other, it is a mess. I should need an additional line break between posts listed. Any tips on how to add that?
Thanks in advance for any help!
Hi there! This plugin is great!
To make it greater, you should:
1) Expose the related posts query to filters, to allow customization:
Line Number 55:
[code]$q = "SELECT p.ID, p.post_title, p.post_content,p.post_excerpt, p.post_date, p.comment_count, count(t_r.object_id) as cnt FROM $wpdb->term_taxonomy t_t, $wpdb->term_relationships t_r, $wpdb->posts p WHERE t_t.taxonomy ='post_tag' AND t_t.term_taxonomy_id = t_r.term_taxonomy_id AND t_r.object_id = p.ID AND (t_t.term_id IN ($taglist)) AND p.ID != $post->ID AND p.post_status = 'publish' AND p.post_date_gmt term_taxonomy t_t, $wpdb->term_relationships t_r, $wpdb->posts p WHERE t_t.taxonomy ='post_tag' AND t_t.term_taxonomy_id = t_r.term_taxonomy_id AND t_r.object_id = p.ID AND (t_t.term_id IN ($taglist)) AND p.ID != $post->ID AND p.post_status = 'publish' AND p.post_date_gmt < '$now' "; // leave blank space to avoid garbage!
$q = apply_filters('wp_related_posts_query', $q); // passes query to filters.
$q .= " GROUP BY t_r.object_id ORDER BY cnt DESC, p.post_date_gmt DESC $limitclause;";[/code]
2) Allow other plugins (like qTranslate) to parse correctly output:
Line number 135:
[code]
echo $output;
[/code]
change to:
[code]
echo __($output);
[/code]