Finding the Best Related Posts Plugin for a WordPress Blog
// March 12th, 2011 // No Comments » // Plugins, WordPress Tips & Tricks
Not long ago I had to do some research and determine which was the best related posts plugin for a client’s WordPress blog. She wanted a list of older, related posts at the end of each article to encourage readers to dig further into her blog.
Typically, this would be done by installing and configuring a plugin but her blog had already experienced slowdown issues due to complex plugins bogging down her server. So I needed to find a plugin that would do what she wanted but still be lightweight enough to keep things running smoothly. I found a lot of options out there and ultimately had to tweak a couple of different plugins in order to find the best related posts plugin for her site.
Why Use Related Posts Plugins?
Just as important as getting readers to discover your blog is getting them to stay on your blog. Related posts plugins are helpful tools to encourage readers to continue reading your content. There are a lot of different related posts plugins out there for WordPress and they all accomplish the same thing: they add a list of posts and/or pages of similar content to the end of an article or in the sidebar in order to help readers discover more of your content.
What Was the Best Related Posts Plugin For My Client’s WordPress Blog?
While doing my due diligence I found plenty of bloggers recommending Yet Another Related Posts Plugin (YARPP) as the best related posts plugin. It certainly seemed to be loaded with functionality but it sounded like it came with more bells and whistles than my friend needed for her blog. Even the plugin’s FAQ mentions that some server slowdown can be expected due to YARPP’s database calls.
A bit more searching led me to a pair of simpler, more lightweight related posts plugin solutions: the Related Posts by Category Widget and the Possibly Related Recent Posts plugin.
The Related Posts by Category Widget
This is a very light, easy to use plugin that creates a widget that displays random related posts in the sidebar. It only appears on the single post page and you can customize it to display a certain number of posts and order them a certain way.
It did require a couple of tweaks to get it up and running though. Initially, it would also display the category name of each post listed and I was unable to get rid of it without fiddling with the code.
Line 81:
if($data['showname'] = ‘yes’) {
Needs to be changed to:
if($data['showname'] == ‘yes’) {
It also broke the sidebar when viewing the homepage which also required a bit of code tweaking:
The code “echo $after_widget” located after the closing bracket for “if (is_single())” (as in, after “<?php” and before “register_sidebar_widget” in the PHP file) needs to be deleted to fix the broken layout in the homepage.
The Possibly Related Recent Posts Plugin
Another simple plugin that adds related links to the bottom of each post, both on the homepage and single post page. This is exactly what I was looking for but unfortunately it would only link to the most recent posts it could find. The most recent posts on the homepage would all link to each other and any posts older than a month or two wouldn’t make the cut. Not too useful when you want to encourage readers to dig around your archives and find something they would otherwise miss.
After some more tinkering with the PHP file I stumbled upon a fix. I changed the line:
foreach ( ( get_posts ( ‘numberposts=5&category=’ . $categories . ‘&orderby=date&exclude=’ .
to this:
foreach ( ( get_posts ( ‘numberposts=5&category=’ . $categories . ‘&orderby=rand&exclude=’ .
Changing the “date” to “rand” allowed it to access all the older related posts and display them randomly. Now readers would easily be able to find posts from months ago they never would have looked at otherwise.
As both of these plugins were relatively light I was able to keep both of them running on the site at the same time without slowing down the server. With a little bit of research and tweaking some code, I was able to find the best related posts plugin for my client’s needs.



