Related Posts by Tag Widget

This plugin is a sidebar widget that puts similar posts in the sidebar.

Last updated: 19 March 2009.


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.


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.


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.


  • 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.

9 Responses to “Related Posts by Tag Widget”

  1. Miryam Stenger Says:

    This is just such a clever plugin, just what I was looking for. Thank you, I highly recommend it. :)

  2. Shelley Says:

    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.

  3. Tadhg Says:

    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.

  4. Tim King Says:

    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.


  5. Alan Says:

    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?

  6. adalovelace Says:

    I love your plugin. Is there a way to add an excerpt for the links, or is just the title?


  7. trashwire Says:

    This is exactly the plugin I was looking for! Perfectly integrates with the site and shows relevant posts. Absolutely excellent!

  8. jon Says:

    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.

  9. Tadhg Says:


    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?

Leave a Reply