Following close on the heels of Top 10 v2.4.x, I’ve pushed through an update to my most widely used plugin. Contextual Related Posts v2.3.0 brings several new features and enhancements, tonnes of bug fixes and several tweaks under the hood for cleaner code in line with WordPress Coding Standards.
Existing users can upgrade the plugin from within your WordPress dashboard. Remember to verify your settings and clear the cache when you upgrade.
Please address all support queries in the WordPress.org support forum and not in the comments. If you spot any bugs you can report them in the forums or the Github repo.
Similar to Top 10, the shortcode and widget in Contextual Related Posts v2.3.0 has the new offset parameter. I think this is even more useful for this plugin because you can embed the shortcode multiple times within the post. Note that this feature doesn’t work seamlessly with the inbuilt cache as yet. You’ll need to use can external caching plugin to achieve the best output. And, you should anyway, right?
Insert after nth parameter
This was a feature contributed by @pjhile. It’s a great new feature that allows the related posts to be either positioned at the start of the post, end of the post or anywhere after the “nth” paragraph. So if you’d like to have the related posts showing after your 3rd paragraph, simply enter 3 in the “Insert after paragraph number” option under General Options.
Exclude this post
Some users asked for an easy way to exclude a post from showing up in the related posts list.
Now if you’re editing a post, page or custom post type, you can simply select this option in the Contextual Related Posts Metabox and then this post will be included in the related posts list even if it is more relevant.
Critical change: HTML output has been changed
This is an important “output breaking” change. Please clear the cache from the settings page if you have this enabled. Instead of using separate links for the thumbnail and the title, this version uses a single link to wrap them both. This ensures cleaner SEO.
I’ve updated the including Rounded Thumbnail CSS to give the same output similar to previous versions. However, if you’re using your own custom styles, then you might need to update these for the new output.
Detailed list of changes in Contextual Related Posts v2.3.0
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
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
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
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 andCRP_PLUGIN_FILE