Contextual Related Posts v2.3.0

This was cross posted on the WebberZone blog

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.

Offset parameter

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?

Widget in Contextual Related Posts v2.3.0
Widget in Contextual Related Posts v2.3.0

 

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.

Contextual Related Posts v2.3.0 Metabox

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

  • 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 andCRP_PLUGIN_FILE

Contextual Related Posts and Top 10 updates

I pushed updates to Top 10 and Contextual Related Posts last week. The main changes are better support for WPML especially the ability to display the posts in the current post language. This could potentially cause some clashes with other plugins e.g. Polylang, which I am continuing to investigate.

Another major change is to the text domain, i.e. what the plugins have used for translations. Following the announcement of the new translation system announced by WordPress.org, I’ve modified the text domains to match the plugin slugsi.e. contextual-related-posts and top-10 respectively. This will eventually result in lower plugin download files and most importantly localised and better maintained languages for Contextual Related Posts in your language.

Read full details in the official plugin update post on WebberZone.com.

Contextual Related Posts v2.2.0

I’ve released v2.2.0 of my most popular plugin Contextual Related Posts today. It also marks an important moment in its development, as the plugin is almost completely rebranded and now available via WebberZone, a platform that will eventually host all my major WordPress projects.

Contextual Related Posts v2.2.0 has several new features, some enhancements to existing features and some bug fixes. Existing users can upgrade the plugin via their Updates screen in the WordPress admin area.

Two main features are the ability to turnoff related posts on a post by post basis as well as specify a set of manual related posts which are given a higher priority over the automatic related posts.

CRP Metabox

If you’re looking for support, please create a new post in the Contextual Related Posts support forum. Bug reports can also be filed in the Github repository.

Full release details can be viewed in this post on the WebberZone blog.

 

CRP Taxonomy Tools v1.1.0

I pushed through a small, but important, update to Contextual Related Posts Taxonomy Tools, which is an addon to Contextual Related Posts. I’ve also developed this as an example for other developers to create addons to Contextual Related Posts.

CRP Taxonomy Tools allows you to restrict the related posts generated by Contextual Related Posts to the same category and tag. At least, it used to until now.

Support for Custom Taxonomies

v1.1.0 now adds support to custom taxonomies as well. This is especially useful to custom post types where the quality of the related post may not be the most ideal set. e.g. if you’re running a movie review blog and you have two different taxonomies for actors and genres, you can now restrict the related posts on your custom post types to just these taxonomies.

Select custom taxonomies in addition to traditional categories and tags
Select custom taxonomies in addition to traditional categories and tags

Disable Contextual Matching

Another feature that I have added to the plugin is the ability to disable contextual matching. This will turn of the core feature that Contextual Related Posts is built on and so is available only as part of this addon. If you do choose to disable contextual matching, make sure that you turn on the restricting by same categories, tags or custom taxonomies. Otherwise, all your posts will return the same related posts.

Disable Contextual Matching
Disable Contextual Matching in Contextual Related Posts

You’ll also find a new option that let’s you restrict the non-contextual matching only to attachments / media and custom post types only.

Disable Contextual Matching on Custom Post Types
Disable Contextual Matching on Custom Post Types

If you activate this option, then posts and pages will continue to show truly related posts. Attachments and custom post types will no longer show contextual matched posts, but would remain restricted to posts from the same category, tags or custom taxonomy.

Closing words

CRP Taxonomy Tools is a very useful addon that enables that extra level of relatedness that you might want to add to your site. If you’re using this plugin and might be looking to get some questions answered, then please make a new post in the Support Forum. Comments below asking for support are likely to be ignored.

If you like this addon, then do consider a 5-star review as well. It’s always encouraging when I read something nice about the work that I do 🙂

And, lastly, CRP Taxonomy Tools is also available on Github. If you’ve got a feature that you’ve already implemented, then consider forking the plugin and send me a pull request. Alternatively, create a new issue with a feature request.

Contextual Related Posts v2.1.0

CRP Thumbnail Options

After the major release of Contextual Related Posts v2.2.0, I’ve spent quite a bit of time over the past few weeks working on v2.1.0 which brings together several bug fixes, some optimisation and many new features. If you’re using this plugin and looking for support, please do not post a comment below, but instead create a new thread in the WordPress.org support forum or create a new issue in Github.

If you’re just upgraded the plugin, remember to clear the cache and even better, reset the plugin settings. Remember to save any custom CSS code that you might be using.

No more Timthumb

I blogged about removing timthumb from my plugins several months ago after Ben stopped supporting the plugin. With Google announcing the shut down of Google Code, I believe this is the final nail in the coffin of an arguably amazing script.

Contextual Related Posts v2.1.0 completely does away with timthumb. The settings have been removed and the script is no longer bundled.

If you’re still looking to use timthumb on your site, you might want to consider self-hosting it. You can find the latest working version in the Github repository I created and the corresponding filter to hook it into Contextual Related Posts.

If you’re looking for a replacement to timthumb, do check out OTF Regenerate Thumbnails. It’s designed to regenerate images on the fly!

Inbuilt WordPress Thumbnails

CRP Thumbnail Options
CRP Thumbnail Options

v2.0.0 came with preliminary support for WordPress’ inbuilt image sizes. However, the implementation wasn’t perfect. I first implemented this GUI in Top 10 v2.0 and have now replicated this within Contextual Related Posts v2.1.1.

You can now select an inbuilt image size or just select a custom size. The default setting  is 150×150 and cropped, which is what the default style uses.

Complete list of changes:

  • New: Separate cache for related posts added to feeds. Prevents conflict with the cache for normal related posts
  • New: Timthumb has been deprecated
  • New: Setting “Related posts should be newer than:” to 0 to disable limiting posts by age
  • New: Filters crp_posts_match, crp_posts_now_date, crp_posts_from_date to modify the WHERE clause
  • Modified: thumb_timthumb, thumb_timthumb_q and filter attributes for the functioncrp_get_the_post_thumbnail have been deprecated. If you’re using this function, an entry will be created for the deprecated log
  • Modified: Reset default thumbnail URL location to plugin default if the field is blank or only contains /default.png
  • Modified: Meta-box will no longer be displayed on non-public post types
  • Modified: For first image, the plugin will attempt to seek the correct thumbnail size if available
  • Fixed: Author link was incorrectly displayed multiple times in the list when Show Author was enabled
  • Fixed: WP Notice Errors when using the Widget via the Customizer menu in WordPress
  • Fixed: Incorrect thumbnail was pulled on attachment pages

Developers and translators

If you’re interested in translating Contextual Related Posts into your own language, do consider joining the WP Translations team and translate Contextual Related Posts on Transifex.

If you’re a developer interested in writing a new feature or have identified a bug that you would like to get fixed, head over to Github, fork the plugin and send me a pull request.

Users

If you’ve been using Contextual Related Posts, do consider writing a good review of the plugin on the WordPress.org forum. Additionally, do consider a donation. Currently, that’s the only income that this plugin generates.

What’s coming?

I still have a lot more features that I plan to add into the base plugin. Some of the features in the timeline in no particular order include:

  • Custom related posts on a post level basis
  • Exclude posts on a post level basis
  • Random posts
  • Stop words / word filters
  • Switching off the meta-box

If you’d like to suggest a feature you can quickly do so by creating a new issue in Github.

I’ll also be focusing on developing a detailed knowledge base for this and my other plugins. I’ve been spending a while researching the best option to go and it might likely be a separate WordPress blog running a custom knowledge base theme.

So go ahead and upgrade this plugin if you’re already using it. If you’re not, why aren’t you? It’s the fastest related posts plugin in the WordPress universe and it’s completely free to use!

Contextual Related Posts 2.0

Contextual Related Posts

Last week I released a major update to Contextual Related Posts. Given the size of the update, I’ve tagged the latest version as 2.0, heralding a new direction in the further development of this plugin.

v2.x brings multi-site support, WordPress thumbnails and a more powerful API. It also has several minor bug fixes and cleaner code.

Multi-site support

One feature that has been missing from Contextual Related Posts has been multisite support, mainly in terms of a Network Activate feature. With the Network Activate feature enabled, a multi-site admin can choose if he wants to activate Contextual Related Posts across all sites in the network or let users activate the plugin independently on their site.

CRP - Network Activate
Network Activate Contextual Related Posts

Once you network activate the plugin, it will no longer show up in the Plugins page of the individual sites. However, users can visit Settings » Related Posts as usual to configure the plugin. If you don’t Network Activate the plugin, it will show up on individual sites and the site admin can choose to activate the plugin if he/she so chooses.

WordPress thumbnails

CRP has had support for timthumb for a long time and by default timthumb was used to create thumbnails. Although timthumb gives you much better control on thumbnail resizing, it does add slightly higher processing on the servers since the images are created on the fly.

Many users have requested to include support for WordPress’ inbuilt image resizing and this feature has found it’s way in v2.0 of Contextual Related Posts.

Thumbnail options in Contextual Related Posts 2.0
Thumbnail options in Contextual Related Posts 2.0

Contextual Related Posts will add a new image size called crp_thumbnail based on the settings above. This means WordPress will create a copy of the image with the specified dimensions when a new image is uploaded. By default, this is set to proportionally crop the image. i.e. the image will first be resized so that the max dimension is as per the above i.e. 150px. You can optionally choose to hard crop the image by enabling the crop mode above. This will cause the image to be cropped to the exact dimensions but this might result in some part of the image being chopped off.

In either case, I strongly suggest running a regenerate plugin like Force Regenerate Thumbnails to recreate the image sizes for your older images. I especially like this plugin because it deletes the old and unneeded image sizes that would have been created in the past and are unnecessarily occupying space on your server.

Extended API

In version 2.0.0, I’ve added several new filters and actions that will allow other plugins / themes or addons to talk to Contextual Related Posts. What’s currently missing is the documentation which I shall be working on over the next several weeks.

If you’re interested in the API, take a look at my new plugin Contextual Related Ports Taxonomy Tools. Available for free from WordPress.org, CRP Taxonomy Tools adds support for restricting posts to the same categories and tags of the current post.

CRP Taxonomy Tools
CRP Taxonomy Tools

This is also a working example of the API that adds settings to Contextual Related Posts and also filters the post query.

Contextual Related Posts on Transifex.

Contextual Related Posts is now on Transifex, ready for translation courtesy the WP Translations. WP-Translations is the place where you will find a number of WordPress amazing Plugins and Themes to make them available in your home language. In exchange you will receive credit for your work and will certainly make part of the WP community history in your country.

If you’re a translator, do consider joining the Wp Translations team. Visit Contextual Related Posts on Transifex.

Closing words

As usual, if you’ve got any questions please open a support ticket in the WordPress.org forums. It allows me to answer your question quickly and more efficiently. Emailing me your support query or writing it in a comment is most likely going to be missed due to volume of emails I receive.

If you’re an existing user of the plugin, do consider writing a review. WordPress developers are welcome to contribute to the plugin via GitHub. Create an issue or fork the plugin and submit a pull request for me to review.

And, before I forget, Contextual Related Posts also has a brand new header.

Contextual Related Posts

Detailed changes in 2.x

2.0.1

  • Fixed: Clear Cache button which broke in 2.0.0

2.0.0

  • New: Multi-site support. Now you can Network Activate the plugin and all users will see related posts!
  • New: Thumbnails are registered as an image size in WordPress. This means WordPress will create a copy of the image with the specified dimensions when a new image is uploaded. For your existing images, I recommend using Force Regenerate Thumbnails
  • New: Completely filterable mySQL query to fetch the posts. You can write your own functions to filter the fields, orderby, groupby, join and limits clauses
  • Modified: Lookup priority for thumbnails. The thumbnail URL set in the Contextual Related Posts meta box is given first priority
  • Modified: Removed border=0 attribute from img tag for HTML5 validation support
  • Modified: Default option for timthumb is disabled
  • Modified: Default option for post types to include is post and page
  • Modified: get_crp_posts has been deprecated. See get_crp_posts_id instead
  • Modified: Turning on the Default style will switch on thumbnails, correctly resize them and will also hide authors, excerpts and the post date
  • Fixed: Post image will now be loaded over https if the visitor visits your site on https

Download Contextual Related Posts

Contextual Related Posts v1.9.1

Contextual Related Posts meta box

I released v1.9.1 of Contextual Related Posts yesterday. This version adds a new meta box in your Add/Edit Post screen. You’ll also find this in the similar screens for Pages and other Custom Post Types.

Contextual Related Posts meta box
Contextual Related Posts Meta box let’s you add your custom thumbnails

The meta-box currently provides you with a single field that allows you to specify the URL of the thumbnail that you wish to use in case a Featured Thumbnail isn’t set for the post. In a future version of the plugin, this will be given priority over the Featured Thumbnail.

The meta box will use the same meta field as specified in the General Settings. If you’re using the default field name i.e. post-image and you’re using my other plugins Top 10 and Where did they go from here, then they will automatically recognise this thumbnail!

I’ve also renamed the widget under Appearances to Related Posts [[CRP]], so you can find it quickly. If you’re using timthumb, then you’ll might be happy to know that I’ve added w.org and github.com to list of allowed sites. w.org is nothing but WordPress.org and github.com needs no introduction.

As usual, existing users can upgrade the plugin from within their WordPress Admin interface. If you’ve not tried Contextual Related Posts yet, then you’re missing out on a major way to boost your site’s viewer retention.

Contextual Related Posts doesn’t use any third party services to fetch related posts. It uses your own posts and everything is saved in your database.

If you’ve got any queries, please check out the FAQ or post in the dedicated support forums. Alternatively, you can always avail of a paid support via email.

List of changes in Contextual Related Posts v1.9.1

  • New: Meta box on the Edit Posts, Pages and custom post type pages to easily add the location of the URL of the thumbnail image
  • Modified: Refined match title algorithm. Previously this would match the post title with both the title and content
  • Modified: Widget initialisation
  • Modified: Massive code cleanup and more documentation in the WordPress settings page
  • New: Added w.org and github.com to list of allowed sites for timthumb

Download Contextual Related Posts

Where did they go from here v1.7 released

Where did they go from here

I’ve been cleaning up the code in my WordPress plugins and releasing one update at a time. I give you the newest version of Where did you go from here. This plugin will give you a set of related posts by a very different and unique criteria: What are your visitors viewing?

You’ve seen this before on Amazon.com’s product pages? Amazon is a great example of visitor retention through recommendations. All of Amazon’s pages have a “Customers who viewed this also viewed”. Now ask yourself how many times you can clicked these links.

One of the key changes to this plugin is the redesigned admin interface. It’s responsive and fits better into your WordPress Admin interface. I’ve gotten rid of the tabbed interface for a collapsible options interface. The plugin comes ready out of the box and you can always jump into the settings page to fine-tune your settings.

Another main addition to the v1.7 is the new meta box at the bottom of your Write screens. You’ll find this on your Posts, Pages as well as Custom Post types. You can now enter a comma separated list of IDs of posts, pages or custom post types. Future versions of the plugin will include an ability to Bulk Edit these entries.

Where did they go from here

I’ve also incorporated a slightly different tracking code that now uses jQuery.ajax() instead of SACK. On many sites, this would likely mean loading one less JavaScript file. It also ensures that the plugin has even better compatibility with W3 Total Cache and other caching plugins.

Last but not the least, I’ve cleaned up most of the code in the plugin to make it more readable and better documented.

If you don’t have Where did they go from here installed on your WordPress blog yet, then give it a test drive. Existing users can upgrade the plugin from within the WordPress interface.

Like my other plugins, this comes with great and prompt support via the WordPress.org support forums or paid support via email. You’ll also find the “forever under development” version on GitHub. Feel free to fork the plugin and send me a pull request with a feature you’ve implemented.

Summary of changes in v1.7

  • New: Redesigned responsive admin interface
  • New: Edit the list of followed post IDs in the Write Post screen
  • Fixed: Language initialisation
  • Fixed: Custom post types in list of posts
  • Modified: Tracking script to improve compatibility with caching plugins

Download Where did they go from here

Contextual Related Post v1.8.10

WordPress

Two days back I pushed through the latest version of Contextual Related Posts. The latest version of Contextual Related Posts adds two new features. Existing users will be able to update it from within your dashboard. If you’re new to CRP, I strongly suggest giving this a test drive. You won’t want to switch back from my plugin!

You can now limit the number of characters of content that will be compared. This can be a big boost to performance especially if you have very huge posts.

WordPress

Another feature addition is the ability to add the post title into the header of the posts. I have also changed the class of the widget so that it differentiates it with the list of posts that are displayed inline with content. This ensures that you can have two completely different set of styles for both different lists. You can use crp_related and crp_related_widget for the inline posts and the widget respectively.

If you have any questions or queries do head over to the support forum. It’s the best and quickest way to get your queries resolved. If you’re a current user and love this plugin, do consider leaving a good review and maybe even a small (or big) donation.


Changes in 1.8.10

  • New: Limit the numbers of characters of the content being compared. This can give a marginal boost to performance
  • New: You can now choose to display the Post title in the Title of the Related posts, by using %postname%
  • Modified: Widget class has been changed to crp_related_widget
  • Modified: Including the author in the list will now use the Display Name which is set under “Display name publicly as” in the User Profile page
  • Modified: Updated timthumb
  • Modified: Better handling of echo_ald_crp – Thanks to flynsarmy for this patch
  • Fixed: If the Thumbnail meta field is omitted under Output Options, the plugin will automatically revert to its default value i.e. “post-image”
  • Modified: More descriptions for the various options

Changes in 1.8.10.1

  • Fixed: Manual install caused a PHP error in 1.8.10

Download Contextual Related Posts v1.8.10.1

Contextual Related Posts v1.8.9

New in CRP v1.8.9

Have you had a chance to check out the new version of Contextual Related Posts. In this release I have incorporated several features that many users have requested.

If you’ve been using another related posts plugin, do check out Contextual Related Posts. It is one of the most feature rich related posts plugins for WordPress with support for thumbnails, shortcodes, widgets, custom post types, caching and CSS styles.

New in CRP v1.8.9

Changes include:

  • New: Option to choose between using CSS styles or HTML attributes for thumbnail width and height. HTML width and height attributes are default
  • New: Filters crp_title and crp_heading_title can be used to customise the Title of the posts and Heading Title of posts list respectively. Check out the FAQ for further information
  • New: Option to add the author to the list of posts
  • New: Options in the widget to show author and date
  • New: Bypass cache option for echo_ald_crp. This is the default option. You can force the cache using echo_ald_crp($cache=true)
  • Modified: Shortcodes are now stripped from excerpts
  • Fixed: Lists for the widget and for in-post have independent caches to prevent overlap
  • Modified: Saving widgets settings will clear the widget cache
  • Fixed: Plugin will now create thumbnails from the first image in gallery custom posts
  • Fixed: Uninstall script should now clean the cache as well

If you have any questions or queries do head over to the support forum. It’s the best and quickest way to get your queries resolved.

Download Contextual Related Posts