Contextual Related Posts v2.9.0
I’ve uploaded Contextual Related Posts v2.9.0 to the WordPress repository. This version brings a several new features and enhancements. A few bugs have been squashed and some bits of code tweaked. As always, if you’re looking for support, please create a new post at the WordPress.org support forum.
Export/Import settings
You will now find a new section under the Tools page which can be accessed via the link in the Settings page.
The new section is called Export/Import settings and you’ll find two buttons – one to Export Settings and one to Import Settings. This is ideal if you’re managing multiple blogs and would like to replicate the settings.
Only show related posts from selected categories
The Contextual Related Posts shortcode now has a new setting include_cat_ids
to limit top posts to selected categories/taxonomies. Use a comma separated list of term_taxonomy_id. This is usually same as the term_id except for much older installations before the terms were split.
This is also reflected by a new option in the widget called Only from categories as you can seen in the screenshot below. This option only supports Categories at this time and will allow you to autocomplete these categories when you start typing them.
Code autocomplete
Following the release of code highlighting support in Top 10 v2.9.0 and Add to All v1.6.0, I’ve now included the same support in Contextual Related Posts v2.9.0. You should be able to see the CSS code in the styles tab highlighted. The editor will also show you any CSS errors in the code so that you can fix it.
Changes in Contextual Related Posts v2.9.2
- Bug fixes:
- Password protected posts will no longer show the excerpt
Changes in Contextual Related Posts v2.9.1
- Bug fixes:
- Custom CSS box was not saved when saving settings
All changes in Contextual Related Posts v2.9.0
- 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 tocrp_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
andget_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.
- New function:
- 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 functioncrp_str_putcsv
Currently, it’s the best addition to wordpress, I’ve been using it for many years. Every novelty pleases, it can even add a widget of random themes to make it fun to be available in this add-on.