This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

M Similar Posts


This plugin adds a widget to WordPress that will list similar posts to the one being reviewed. The widget will only be rendered on a post single page, as otherwise it would not be relevant.

A shortcode is also available — [magadanski-similar-posts]. There are several attributes available for the shortcode:

  1. ID — (integer) the ID of the post you’d like to get similar posts for. Default value: the current post ID.
  2. post_type — (string) the post type you’d like to query. Default value: “post”.
  3. taxonomy — (string) the taxonomy based on which you’d like to get similar items. Default value: “category”.
  4. limit — (integer) a maximum number of results you’d like to receive. Default value: 5.

The similarity is considered based on the number of common categories for this posts and the rest of the posts in your blog.


  • The options for the plugin's widget.


Download and activate the plugin. Go to Widgets and add the Similar Posts widget to a sidebar of your choosing.


How does the plugin determine whether two posts are similar?

It checks the categories assigned to this and other posts. The most similar post is considered the one with the most common categories.

Does this work for tags too?

Yes, when inserting the widget you are allowed to chose between categories, tags or any custom taxonomy you have.

Does this work for custom post types?

Yes, this works for pages, posts or any custom post type you have.

Does this check the post’s content too?

No, currently similarity is calculated only by shared taxonomy terms (categories, tags, etc).

Is the plugin offered in my language?

The plugin is originally distributed in English and is also translated in Spanish and Bulgarian. In case you need it in some other language you can help with this on

Contributors & Developers

“M Similar Posts” is open source software. The following people have contributed to this plugin.


“M Similar Posts” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “M Similar Posts” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



VisualComposer icon update to match latest branding of

Tested against WordPress version 4.6.1.


Updates to allow translation via


Tested compatibility with WordPress 4.5 — no issues registered.


Bugfix: added missing return statement for public functions.

This is an absolutely safe to install update — it won’t break any of the existing functionality and you are encouraged to do so.


Dev: The following filters have been added for some control over the generated list markup:

msp_similar_posts_list_tag -- by default this is `ul` but you can set it to `ol`.

There are two more similar filters for this: msp_similar_posts_shortcode_tag and msp_similar_posts_widget_tag. As you may guess by the name, those allow to set the tag for only either the shortcode markup or the widget markup.

These secondary filters are executed after the main msp_similar_posts_list_tag, so they can overwrite the value.

msp_similar_posts_list_classes -- this allows you to add/edit/remove classes for the list tag. By default only one class is present: "msp-list".

There are two secondary filters for this as well: msp_similar_posts_shortcode_classes and msp_similar_posts_widget_classes.


Dev: fix for notice — missing “global” keyword for variable.


Fix for widget bug to allow support for custom post types.


Fix for improper regular expression for request SQL query modification.


Dev: added msp_get_similar_posts() shortcut function.


Bugfix for showing the plugin widget on pages if necessary.

Fix for other potential issues.


Internationalization updates.

Feel free to submit patches for updating Spanish translation or adding a new one.


Added WPBakery Visual Composer integration.

Fix: set_similar_id uses current post’s ID only if $id argument is 0 AND similar_id property is 0 too.

Dev: externalized get_post_types and get_taxonomies methods for Magadanski_Similar_Posts_Widget widget as global helper functions prefixed msp_:

  • msp_get_post_types
  • msp_get_taxonomies


Tested compatibility with WordPress 3.8 — no issues registered.

Added Spanish localization for the plugin thanks to Andrew Kurtis from WebHostingHub


Fix for cause preventing widget from rendering.


  • Added inline documentation and some code comments.
  • Plugin name rebranded from “Magadanski Similar Posts” to “M Similar Posts”
  • i18n, filters and function prefixes updated to match rebranding — “msp” is used instead of “simposts”

The folder for the plugin files has been kept to “magadanski-similar-posts” to prevent plugin deactivation upon update.

Hopefully the available custom filters have not been widely spread, so this change will not affect any custom code.


Updated readme.


Added [magadanski-similar-posts] shortcode.


Added proper screenshots


Updated readme.


Plugin was released.