Related Posts by Tag Widget
This plugin is a sidebar widget that puts similar posts in the sidebar.
Last updated: 19 March 2009.
Installation
Download and unzip the plugin into your WordPress plugins directory.
Activate the plugin on your Admin Plugins page.
Adjust the widget settings on your Admin Widgets page.
Details
The “similar posts” are posts whose tag sets are similar to the tag set of the current post.
The widget displays on single pages.
Also allows the list of related posts to be added to the end of posts, or of posts in the RSS feed.
Examples
On this page the post has the tags sports and tennis. The most recent other post that has both of those tags is shown at the top of the list, followed by the other posts that have both tags ordered by how recent they are.
This post has the tags culture, language, personal, travel. The post that shares three of the four (culture, language, personal) is at the top, followed by posts which have two of the four, ordered by date.
Requirements
- PHP 5
- a version of WordPress that supports sidebar widgets (anything after 2.2, I think)
Frequently Asked Questions
How can I hide the datestamps next to the related posts?
In the widget settings, set the date format to blank.
How can I show the list at the end of posts (in RSS or on single pages) without having the widget in my sidebar?
Put the widget in your sidebar, check the checkbox for adding the list to the end of the post (or in the RSS feed), click ‘Done’, and then save your widget changes. When the page reloads, remove the widget from the sidebar and save the changes.
21 May 2009 at 15:56
This is just such a clever plugin, just what I was looking for. Thank you, I highly recommend it. :)
20 Jul 2009 at 05:24
Is this plugin compatible with pages? I’ve added Simple Tags to my pages, but I need to show related pages exactly how you’re showing related posts here.
20 Jul 2009 at 08:19
Shelley: currently it doesn’t look at pages, but I don’t think that functionality would be too hard to add. If I get that to work, I’ll drop you an email.
26 Aug 2009 at 19:48
I modified my copy of the plugin to search categories as well as tags, because I want it to work even on my older blog posts, which don’t have tags. In the two places where the plugin code says:
taxonomy = 'post_tag'
I changed that to
taxonomy IN ('post_tag','category')
Not sure you want to add this into the plugin trunk, unless you also add a configuration option to select tags, categories, or both. But I thought I’d mention my hack here.
Cheers,
-TimK
15 Oct 2009 at 13:33
I just installed the latest version of WP for the first time and the plugin doesn’t seem to work. I must be missing something… Where do I actually indicate which Tags I want to look for? The Related Posts widget only has text inputs for the Title, Number of related posts, and the Date format.
Any suggestions?
08 Apr 2010 at 09:43
I love your plugin. Is there a way to add an excerpt for the links, or is just the title?
Thanks
01 Oct 2010 at 14:26
This is exactly the plugin I was looking for! Perfectly integrates with the site and shows relevant posts. Absolutely excellent!
15 Mar 2011 at 19:57
Not working, as a test I gave 6 posts the same tag, but when I show one of them there’s nothing in the widget.
15 Mar 2011 at 19:59
jon,
I haven’t touched the codebase in a long time, and it still works for me as of WordPress 3. Does anything show up? What happens when you try posts with multiple tags?