I know, there are a lot of widgets out there, to print related posts, but none of them I tested really suited my needs. First of all I think a widget shouldn’t have a whole bunch of global settings, rather no global settings at all, I mean, it’s just a widget. But, even if I don’t like a huge settings page, just to run a little widget, there has to be some flexibility to let me adjust every widget-instance to my needs.
The Simply Related Posts Widget
In the case of related posts I couldn’t find a widget that really did what I wanted so I build my own. There are no global settings, but every widget instance has four options:
- The title of the widget (default: Related Posts). It is similar to all other widget titles and gets printed before the widget-content.
- The taxonomy by which terms the posts are related (default: Tags). A post is related to another post, as soon it they share one or more terms of a taxonomy. This can be the standard taxonomies Tags and Categories, or Custom taxonomies. Here youchoose which taxonomy is the relating one.
- How many related posts to show (default 5). Quite simple, put the maximal number of related posts you want to be visible here.
- Terms to exclude (default: none). Sometimes there are terms in a taxonomy, which are related to almost every post. The tag wordpress in my blog is such an example. If you have such tags you should exclude them, because they relate basically all posts, which would make the widget quite useless
- Download the plugin from the directory: Simply Related Posts
- Unpack and upload the
simply-related-postsfolder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
- Go to the ‘Apearance/Widgets’ area, add the ‘Simply Related Posts’ widget to a widget area.
- Make your settings
Of course I want your feedback: Bugs or feature requests are welcome in the comments of this post or via twitter and I appreciate every review.
For now the code is available via svn from the plugin directory:
Now, there is even a github repository:
16 thoughts on “Simply Related Posts, a WordPress Widget Plugin to relate Posts by taxonomy the easy way”
many thanks for this simple and pure widget.
could you post the code which we can use to visualize the related posts under a post itselfe, e.g. in the single.php?
you could define a new widget area in your single.php template. There is an excellent article on automattic.com. Here is how you do it in short:
1. Register a widget area in your functions.php
2. Add the Simply Related Posts widget to the new area which should be popping up on the widgets page in your admin interface.
3. Load the widget area in your single.php file
4. If you like the plugin, I would be happy to get a review on wordpress.org 😉
Hi .. I have added the widget to a sidebar but nothing is showing up. Please can you help? Thanks
Hi, are there other widgets showing up in the sidebar? Try to add an simple text-widget and check if it appears in the sidebar, so we know that the sidebar itself works.
Then you have to check if it is a single template you try to include the widget on, otherwise it wouldn’t show up.
You can test to disable all other plugins as well to see if one of them is causing the problem and of corse there have to be some related posts and relations to show.
If all that doesn’t work I need more information about your setup, are there custom post types, taxonomies or other functionality?
Thanks for building a great and simple plugin 🙂
I added a fix to support custom types, just by taking the post_type from the $instance and using it in the query.
I thought it might help others and it won’t hurt to add it to the codebase.
perfect, thanks. I will add it as soon as possible.
Yes, thanks for this plugin, work really cool 🙂
Awsome plugin! Thank you!!
How can i add a thumbnail image?
Just a quick question for some clarification:
I’d like to have a WooCommerce product display posts that are related by tags, but also on a single post page, display WC products that are related by tag.
Is it possible to accomplish this with Simply Related Posts?
WordPress Related Posts plugin is best in all im using on www,brightverge.com you can use it with thumbnail image according to your choice. Thanks for sharing
Great, easy to use plugin. Can you detail a bit about exactly how it determines if two posts are related or not?
I really like the keep it simple approach!
The only problem that this plugin is not respecting the multilingual post/page titles. Instead simply cut the language tags, and merge all the multi language titles to one string.
Not sure if its a bug or a missing feature 🙂
Wordfence is now giving me a warning “The Plugin “Simply Related Posts” appears to be abandoned… It was last updated 2 years 8 months ago. It may have compatibility problems with the current version of WordPress or unknown security issues”. Any chance there will be future updates to this plugin?
sorry, I don’t think there will be any feature upgrades soon, but I will check if it’s still working with the newest WP-version and update in the repository. That should eliminate the warning.
All the best