Contextual Related Posts v2.5.0

I’ve just released Contextual Related Posts v2.5.0 and existing users can update the plugin as usual from within their WordPress install. This release adds a few minor features as well as a few bug fixes that were reported by users.

Disable on AMP pages and mobile devices

One feature requested by a lot of users is to disable the related posts display on mobile devices and AMP pages. With the inbuilt cache, the display of the related posts is super fast. However, you do need to write some custom styles in order to make the display work on both mobile and AMP pages particularly because of the screen size.

As a result, some users requested an option to disable the display of the posts. Previously you could use filters to override the display, but now you have two options to disable related posts on mobile devices and pages that have the AMP endpoint. I’ve tested this with AMP for WordPress.

You can find the settings under the General tab.

New filters

I’ve also added two new filters crp_thumb_alt and crp_thumb_title. These allow you to override the alt and title tags of the post thumbnail. By default, these are alt="{post title}" and title="{post title}".

Additionally, v2.5.0 also introduces a new function and filter crp_permalink. This allows you to override the permalink of each post item e.g. add a query string for tracking purposes.

Detailed changelog in Contextual Related Posts v2.5.0

  • 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
Share this post with your friends!

Leave a Reply

Your email address will not be published. Required fields are marked *

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.