Contextual Related Posts

Wordpress Plugin
Download latest - 3.2.3



Download Stats

Today 70
Yesterday 105
Last Week 804
All Time 749,552
Banner 772x250

Contextual Related Posts is a powerful plugin for WordPress that allows you to display a list of related posts on your website and in your feed.

The list is based on the content of the title and/or content of the posts which makes them more relevant and more likely to be of interest to your readers. This allows you to retain visitors, reduce bounce rates and refresh old entries.

Although several similar plugins exist today, Contextual Related Posts is one of the most feature rich plugins with support for thumbnails, shortcodes, widgets, custom post types and CSS styles. The inbuilt cache ensures that you have related posts without excessive load on your server.

And the default inbuilt styles allow you to switch between gorgeous thumbnail-rich related posts or a similar text display!

Key features

  • Automatic: CRP will start displaying related posts on your site and feed automatically after the content when you activate the plugin. No need to edit template files
  • Manual install: Want more control over placement? Check the FAQ on which functions are available for manual install
  • Gutenberg / Block Editor support: You can find a block called "Related Posts [CRP]" with its own configurable set of options
  • Widgets: Add related posts to widgetized area of your theme. Lots of options available
  • Shortcode: Use [crp] to display the posts anywhere you want in the post content
  • The algorithm: Find related posts by title and/or content of the current post
  • Caching: Related posts output is automatically cached as visitors browse through your site
  • Exclusions: Exclude posts from categories from being displayed in the list. Or you can exclude posts or pages by ID
  • Custom post types: The related posts list lets you include posts, pages, attachments or any other custom post type!
  • Thumbnail support:
    • Support for WordPress post thumbnails. CRP will create a custom image size (crp_thumbnail) with the dimensions specified in the Settings page
    • Auto-extract the first image in your post to be displayed as a thumbnail
    • Manually enter the URL of the thumbnail via WordPress meta fields. Specify this using the meta box in your Edit screens.
    • Optionally, use timthumb to resize images or use your own filter function to resize post images
  • Styles: The output is wrapped in CSS classes which allows you to easily style the list. You can enter your custom CSS styles from within WordPress Admin area or use the style included.
  • Customisable output:
    • Display excerpts in post. You can select the length of the excerpt in words
    • Customise which HTML tags to use for displaying the output in case you don't prefer the default list format
  • Extendable code: CRP has tonnes of filters and actions that allow any developer to easily add features, edit outputs, etc.


  • Related Posts by Categories and Tags


Contextual Related Posts is GDPR compliant as it doesn't collect any personal data about your visitors when installed out of the box. All posts are processed on your site and not sent to any external service.



I spend a significant amount of my free time maintaining, updating and more importantly supporting this plugin. Those who have sought support in the support forums know that I have done my best to answer your question and solve your problem. If you have been using this plugin and find this useful, do consider making a donation. This helps me pay for my hosting and domains.


Contextual Related Posts is also available on Github. So, if you've got some cool feature that you'd like to implement into the plugin or a bug you've been able to fix, consider forking the project and sending me a pull request.

Bug reports are welcomed on GitHub. Please note GitHub is not a support forum and issues that aren't properly qualified as bugs will be closed.


Contextual Related Posts is available for translation directly on Check out the official Translator Handbook to contribute.

Releases (65 )

Version Release Date Change Log
2.9.2 2020-05-08

Release post:

Bug fixes: * Password protected posts will no longer show the excerpt

2.9.1 2020-04-26

Release post:

Bug fixes: * Custom CSS box would not save and get cleared out when saving settings

2.9.0 2020-04-18

Release post:

  • Features:

    • New section under Settings > Related Posts > Tools to export and import settings. Best option if you'd like the same configuration across multiple WordPress sites
    • New shortcode setting include_cat_ids to limit top posts to selected categories/taxonomies. Use a comma separated list of term_taxonomy_id
    • New setting in widget to only include certain categories. Doesn't work with custom taxonomies
  • Enhancements:

    • New function: crp_get_thumb_size() to get the correct size of the thumbnail
    • Only run a get_post query if only the post ID is passed to crp_get_the_post_thumbnail()
    • $match_fields parameter added to crp_posts_match filter
    • Updated WPML functions to use latest filters
    • Admin scripts are no longer loaded into the head - but using a separate JavaScript file
    • Implemented CodeMirror to format custom styles box
    • New filters get_crp_short_circuit and get_crp_posts_id_short_circuit to bypass outputs and queries
    • CRP_MAX_WORDS has been reduced from 500 to 250 to avoid "Too many words" mySQL error
    • The link to the Contextual Related Posts link is no longer a list item but a smaller text paragraph below the items. You can turn this on by enabling Show Credit.
  • Bug fixes:

    • Fixed errors created when trying to fetch a featured image or scanned images with remote links
    • Saving categories fields in the settings page uses str_getcsv and a custom function crp_str_putcsv
2.8.0 2019-12-30

Release post:

  • Features:

    • New block for Gutenberg aka the block editor. The block is called Related Posts [CRP] and you can find it under the widgets category
    • Two new settings in the widget: Order posts and Randomize order that allows the global setting to be overridden
    • New setting called Keyword in the Meta box where you can enter a word or a phrase to find related posts. If entered, the plugin will continue to search the post_title and post_content fields but will use this keyword instead of the values of the title and content of the source post
  • Enhancements:

    • Show author, Show date, Show post excerpt and Post thumbnail settings will show a message that they cannnot be modified in case the Rounded thumbnails or No text styles are selected
  • Bug fixes:

    • Selecting date order now orders the related posts by newest first
    • Fixed PHP warning in the widget
    • Stop using current_time( 'timestamp' )
    • Fixes incorrect thumbnail image displayed for attachments in the related posts list
2.7.0 2019-06-16

Release post:

  • Features:

    • Caching improvements: "Enable cache" has been renamed to "Cache HTML output". New option "Cache posts only" has been introduced to cache the output of the database query (array of posts)
    • New option to order posts by relevance, dates or randomly
    • New option to limit posts by the same author
    • Thumbnail HTML markup includes srcset and sizes attributes when available. Read Responsive Images in WordPress 4.4
  • Enhancements:

    • No longer use get_the_title. You can use crp_title and/or crp_thumb_title filters to edit the post title and the alt/title attributes of the thumbnail respectively
    • Selecting Rounded thumbnails under Styles tab will allow your thumbnail setting to either be "inline before text" or "only thumbnails, no text"
2.6.3 2019-04-27

Release post:

  • Enhancements:

    • Optimized versions of default.png and default2.png
  • Bug fixes:

    • Fixed PHP error when viewing feed
    • "Exclude categories" setting wouldn't save properly
    • Delete any deprecated settings on save should work properly
    • Clearer messages when saving options and a style is activated
2.6.2 2019-04-04

Release post:

  • Bug fixes:
    • Fixed PHP fatal error "Cant use function return value in write context"
    • Changed default setting for thumbnail width and height to 150
2.6.1 2019-04-03

Release post:

  • Features:

    • New options to delete options and/or data on uninstall. This will only work if you visit the Settings page and save the pages.
  • Bug fixes:

    • Custom CSS code should now be properly added to the header
    • Upgrading settings when "Automatically add related posts to" had no options checked should work properly
2.6.0 2019-04-02

Release post:

  • Features:

    • Implemented the Settings API for handling plugin settings
    • New Tools page: Recreate the indices, delete the cache and delete old settings
  • Enhancements:

    • widget_title filter includes $instance and id_base variables
  • Bug fixes:

    • Checked for non-zero thumbnail width and height in the widget
    • More checks for PHP errors and notices
2.5.1 2019-01-26
  • Features:

    • New option to disable creation of thumbnails
  • Enhancements:

    • Do not delete index on activation
    • crp_thumbnail image size will set the default crop option to true if not already set
  • Bug fixes:

    • Missing/Unknown PHP errors/warnings in the widget
    • Minor CSS fixes
2.5.0 2018-12-09
  • Features:

    • New option to disable related posts on mobile devices
    • New option to disable related posts on AMP pages
  • Enhancements:

    • New filters crp_thumb_alt and crp_thumb_title to edit the post thumbnail alt and title tags. Use this to remove/replace the tags
    • New function and filter crp_permalink
    • Saving a post will delete its cache
  • Bug fixes:

    • Fixed CSS validation errors
    • Removed conversion of table schema from/to InnoDB. If you are using a version of mySQL above v5.6, you can alter the table engine to use InnoDB with a FULLTEXT index
    • Prevent errors from non-existent post id (virtual post). Contributed by @jnorell
2.4.1 2017-06-12
  • Bug fixes:
    • Reverted the "Automatically add related posts to" setting introduced in 2.4.0
    • Metaboxes will now save when editting attachments
2.4.0 2017-06-10
  • Features:

    • New option to randomize the related posts
    • New option to limit related posts to the same post type
    • "Automatically add related posts to" option applies to widgets
  • Enhancements:

    • post_types argument now takes a comma-separated list of post types. Default format when resaving options is also comma-separated
  • Bug fixes:

    • Trimming titles should now work with multibyte / non-English characters
  • Deprecated:

    • crp_max_formatted_content has been deprecated. Use crp_trim_char instead
2.3.1 2016-12-17
  • Bug fixes:
    • Replaced .crp_title wrapper from div to span. Empty the cache via the settings page and also your browser cache
2.3.0 2016-10-01
  • Features:

    • Shortcode and the widget now have an added parameter for 'offset'. This is useful if you would like to display different widgets/shortcodes but not always start from the first post
    • New option in metabox: "Exclude this post from the related posts list"
    • New option: Insert after nth paragraph
  • Enhancements:

    • The generated HTML code uses a single a href tag rather than two separate ones per item which is usually better for SEO. If you're not using the Rounded Thumbnail style and using your own custom style, then you might need to reconfigure this
    • New constant CRP_MAX_WORDS (default 500) limits the post content to be compared. Add this to your wp-config.php file to overwrite
  • Bug fixes:

    • Language files initialisation had the wrong text domain
    • Stop updating the thumb settings if the existing value isn't found. Caused incorrect changes in certain installations
    • Force link text to white when using Rounded Thumb style
    • The plugin will no longer generate any notices if post author is missing
  • Deprecated:

    • Removed wick for exclude categories auto-suggest. Plugin now uses jQuery Suggest that is included in WordPress. When you re-save plugin options, the field will convert the slugs to the category name
    • Deprecated $crp_url. Use the new constants CRP_PLUGIN_DIR, CRP_PLUGIN_URL and CRP_PLUGIN_FILE
2.2.3 2015-09-27
  • Enhancements:

    • Changed text domain to contextual-related-posts in advance of translation system
    • Improved support for WPML. If available, same language posts will be pulled by default. To restrict to the same language add this code to your theme's functions.php file
    • Removed id tag from related posts HTML output to make it W3C compliant. If you're using the id with your custom styles, please change this to classes i.e. change #crp_related to .crp_related and it should work
  • Bug fixes:

    • All cache entries were not deleted on uninstall
2.2.2 2015-09-19
  • Features:

    • Preliminary support for WPML
  • Enhancements:

    • Recreate Index and Activation will not try to alter the table engine if not needed
  • Bug fixes:

    • All thumbnail classes were not properly applied + new thumbnail class filter
    • Shortcode with "exclude_categories" argument works again
2.2.1 2015-09-05
  • Bugfixes:
    • "No styles" would not get selected if "Rounded thumbnails' was enabled
    • "Recreate Index" caused a fatal error: Call to undefined function crp_single_activate()
    • Excerpt shortening was not working correctly
    • Exclude categories wasn't working in some cases
    • Additional check to see if default styles are off, then force No style
2.2.0 2015-09-03
  • Features:

    • Manual posts can now be set in the meta box in the Edit Post screens which will be displayed before the related posts fetched by the plugin
    • Choose between No style, Rounded thumbnails (previously called default style) and Text only style options under the Styles box in the plugin settings page
    • Option to turn off the Contextual Related metabox on Edit Posts screens or limit it to Admins only. Also applies to Pages and Custom Post Types
    • Filter crp_link_attributes that allows a user to add or remove attributes for the a tag
    • Notice is displayed at the top of the Settings page if there are any missing of the FULLTEXT indices missing
    • Option in the Contextual Related Posts meta box to disable the related posts on the selected post
    • Select post type in the Related Posts Widget
  • Enhancements:

    • Optimised number of queries for exclude categories option. Those not using this option will see the greatest savings
    • Select a pre-built thumbnail size will automatically update the width, height and crop settings. The default style will no longer enforce the 150x150 thumbnail size.
    • strict_limit argument in get_crp_posts_id is now TRUE by default
    • get_crp takes an additional argument: heading (default is TRUE) that controls the display of the main heading (Related Posts)
    • Output of echo_crp will be cached in a separate meta key
  • Bugfixes:

    • First child now gets the correct thumbnail size
  • Deprecated:

    • ald_crp() - Use get_crp() instead
    • ald_crp_content() - Use crp_content_filter() instead
    • ald_crp_rss() - Use crp_rss_filter() instead
    • echo_ald_crp() - Use echo_crp() instead
2.1.0 2015-05-10
  • Separate cache for feeds; Deprecated timthumb; Bug fixes and new features; Check the Changelog for a full list of changes.


2.1.1 2015-05-10
  • Modified: Settings page now clearly highlights what options cannot be changed if the default styles are enabled, i.e. thumbnail settings and no excerpt, author or date


2.0.1 2014-12-19
  • New multisite support; Thumbnails no longer need timthumb; HTTPS support for thumbnails; filters for mySQL query; Check the Changelog for a full list of changes.


2.0.0 2014-09-04
  • New multisite support; Thumbnails no longer need timthumb; HTTPS support for thumbnails; filters for mySQL query; Check the Changelog for a full list of changes.


1.9.1 2014-05-10
  • New Meta box on the Edit screens; Modifed match title algorithm; code cleanup and bug fixes; Check the Changelog for a full list of changes.

= 2014-03-12
  • Fixed: Add to feeds was broken in v1.9


1.9 2014-03-08
  • New default style, new option to prioritise the posts, exclude related posts on Custom Post types and more... Check out the Changelog for more details.

= 2013-11-20
  • Minor performance improvements + a fix for potential SQL vulnerability

= 2013-11-11
  • Fixed bugs in 1.8.10: Manual install caused a PHP error; Widget title showed %postname% instead of the Title; Refer the Changelog for more information
1.8.10 2013-11-08

= = * New features; Modified widget class to crp_related_widget; Updated timthumb; Modified format of author name that is displayed; Check the Changelog for more information 2013-08-23
  • New: Select between CSS or HTML attributes for thumbnail width and height; Add author to posts; More options in the widget; More cache control; Check the Changelog for more information


1.8.9 2013-08-19
  • New: Select between CSS or HTML attributes for thumbnail width and height; Add author to posts; More options in the widget; More cache control; Check the Changelog for more information


1.8.8 2013-06-02
  • New: Clear cache button and option to add the date before the post title


1.8.7 2013-04-26
  • IMPORTANT security update: Potential XSS vulnerability fixed. Thanks to Charlie Eriksen via Secunia SVCRP for reporting this


1.8.6 2013-04-07
  • New caching option; new function to return related posts; New shortcode; bug fixes and performance improvements Refer to Changelog for more information


1.8.5 2013-01-06
  • New options to open links in new window and add rel="nofollow"; quality setting for thumbnails when using timthumb; custom text for no related posts; new options for related posts in feeds; thumbnail height and width can be configured for widgets; Refer to Changelog for more information


1.8.4 2012-12-16
  • Exclude related posts on certain posts/pages, include related posts on home page and other archive pages, new timthumb version, miscellaneous fixes. Refer to Changelog for more information


1.8.3 2012-06-17
  • New widget support; performance improvements; use the excerpt; exclude posts / pages by page id.


1.8.2 2012-06-16
  • New widget support; performance improvements; use the excerpt; exclude posts / pages by page id.


1.8.1 2012-06-16
  • New widget support; performance improvements; use the excerpt; exclude posts / pages by page id.


1.8 2012-06-04
  • Added support for WordPress Custom Post Types, new Custom Styles tab, timthumb support. Please visit the Settings page to configure soon after upgrade.


1.7.4 2012-05-13
  • Fixed: Clash with YARPP


1.7.3 2012-03-29
  • Fixed: Donation link


1.7.2 2012-03-25
  • Fixed: Title attribute was missing for the thumbnails
  • Modified: Reverted the output code to v1.6.5 style with img wrapped in its own a tag


1.7.1 2012-03-23
  • Fixed: Minor bug fix for location of thumbnail
1.7 2012-03-22
  • Added: Better thumbnail support
  • Added: Limited support for InnoDB
  • Modified: Cleaner Settings page interface


1.6.5 2011-11-13
  • Fixed: Few code tweaks to optimise MySQL performance
  • Added: Dutch and Spanish language files
1.6.4 2011-08-04
  • Fixed: Undefined constants PHP errors
1.6.3 2010-02-20
  • Fixed: The plugin will now display a list of changes in the WordPress Admin > Plugins area whenever an update is available
1.6.2 2010-02-20
  • Turned the credit option to false by default. This setting won't effect current users.
  • Turned off borders on post thumbnails. You can customise the CSS class "crp_thumb" to style the post thumbnail
  • From the next version, the plugin will display update information in your WP-Admin
1.6.1 2010-02-10
  • Fixed: Custom output was not detecting styles properly
  • Fixed: Incorrect XHTML code was being generated when using special characters in the post title
1.6 2010-01-18
  • New: The plugin extracts the first image in the post and displays that if the post thumbnail and the post-image meta field is missing
  • New: Display excerpts in the list
  • New: Credit link to the CRP page added. You can choose to turn this off, though I would appreciate if you leave it on.
  • Updated: All parts of the list are now wrapped in classes for easy CSS customisation
1.5.2 2010-01-17
  • Fixed: Fixed display of post thumbnails using postmeta field
1.5.1 2010-01-09
  • Fixed: Numeric options were not being saved correctly
1.5 2009-12-24
  • Added an Option to display post thumbnails
  • The output can be completely customised now
1.4.2 2009-08-08
  • Fixed: Using doublequotes in the title would mess up the screen
  • Fixed: Errors when the mySQL index was being regenerated
1.4.1 2009-08-06
  • Added Italian and Danish languages
  • Minor fix for text in the admin page
1.4 2009-08-03
  • Added complete localization support
  • Added button to recreate the mySQL FULLTEXT index
1.3.1 2009-03-09
1.3 2009-03-01
1.2.2 2009-02-27
1.2.1 2009-02-26
1.2 2009-02-26
1.1.1 2009-01-28
1.1 2009-01-27
1.0.1 2009-01-23