Display related posts on your WordPress blog and feed. Supports thumbnails, shortcodes, widgets and custom post types!
If your question isn't listed here, please post a comment at the WordPress.org support forum. I monitor the forums on an ongoing basis. If you're looking for more advanced support, please see details here.
Several customization options are available via the Settings page in WordPress Admin. You can access this via Settings » Related Posts
The plugin also provides you with a set of CSS classes that allow you to style your posts by adding code to the style.css sheet. In a future version, I will be adding in CSS support within the plugins Settings page.
The following CSS classes / IDs are available:
crp_related: ID of the main wrapper
div. This is only displayed on singular pages, i.e. post, page and attachment
crp_related: Class of the main wrapper
div. If you are displaying the related posts on non-singular pages, then you should style this
crp_title: Class of the
span tag for title of the post
crp_excerpt: Class of the
span tag for excerpt (if included)
crp_thumb: Class of the post thumbnail
For more information, please visit http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/
The plugin selects thumbnails in the following order:
Post Thumbnail image: The image that you can set while editing your post in WordPress » New Post screen
Post meta field: This is the meta field value you can use when editing your post. The default is
First image in the post: The plugin will try to fetch the first image in the post
Video Thumbnails: Meta field set by Video Thumbnails
Default Thumbnail: If enabled, it will use the default thumbnail that you specify in the Settings screen
The plugin uses timthumb to generate thumbnails by default. Depending on the configuration of your webhost you might run into certain problems. Please check out the timthumb troubleshooting page regarding permission settings for the folder and files.
The following functions are available in case you wish to do a manual install of the posts by editing the theme files.
If you disable automatic display of related posts please add
<?php if(function_exists('echo_ald_crp')) echo_ald_crp(); ?> to your template file where you want the related posts to be displayed.
You can also use this function to display related posts on any type of page generated by WordPress including homepage and archive pages.
Takes a post ID and returns an array of related post IDs.
<?php if(function_exists('get_crp_posts')) get_crp_posts($postid, $limit) ?>
$postid : The ID of the post you'd like to fetch. By default the current post is fetched. Use within the Loop for best results.
$limit : Maximum number of posts to return. The actual number displayed may be lower depending on the matching algorithm and the category / post exclusion settings.
You can insert the related posts anywhere in your post using the
[crp] shortcode. The plugin takes two optional attributes
heading as follows:
[crp limit="5" heading="1"]
limit : Maximum number of posts to return. The actual number displayed may be lower depending on the matching algorithm and the category / post exclusion settings.
heading : By default, the heading you specify in Title of related posts: under Output options will be displayed. You can override this by specifying your own heading e.g.
<h3>Similar posts</h3> [crp limit="2" heading="0"]
Requires: 3.0 or higher
Compatible up to: 3.6
Last Updated: 2013-4-26
3 of 8 support threads in the last two months have been resolved.
Got something to say? Need help?