Cherry Trending Posts

Description

This plugin will allow you to track and display the most popular posts of your WordPress website based on the number of views, rating and the number of comments; and thus increase its view-per-visitor rate.

The plugin comprises three main components:

  • Post Views Counter – displays the number of page views for each post;
  • Post Rating – displays the number of votes and the average rating using a visual five-star system;
  • Widget – shows the most popular posts.

Documentation

Options

You can place the list of your top posts on any page using the Widgets tab in your WordPress dashboard.
The Cherry Trending Posts widget itself is highly customizable: besides the basic settings such as specifying the widget title and setting the maximum displayed length of a post title you can:

  • Filter the posts by their views, comments or rating;
  • Choose, whether to show the most rated or the highest rated posts;
  • Show post from specific tags and categories;
  • Display or hide certain metadata (post author, publishing date, rating, comments, etc.);
  • Set the excerpt length (if displayed);
  • Change the button text;
  • And more.

Widget

You can add the posts to the pages with the help of widget which offers you the following settings.

  1. Title – Specify the widget title
  2. Title length in characters (0 — hide, -1 — full) – Set title length
  3. Filter by:
    • Views – Filter posts by Views
    • Rating – Filter posts by Rating
    • Comments – Filter posts by Comments
  4. Select rating type:
    • Most Rated – Filter posts by Most Rated type
    • Highest Rated – Filter posts by the highest rate
  5. Show from:
    • Category – Show posts from category
    • Tag – Show posts by tags
  6. Number of post to show (Use -1 to show all posts) – Here you can define the number of posts to display
  7. Offset (ignored when "posts_per_page" => -1 (show all posts) is used) – This property specifies the number of post to displace or pass over
  8. Excerpt length in words (0 — hide, -1 — all) – This property sets the number of words limit for excerpt
  9. Display meta – This feature adds metadata to the post:
    • Date
    • Author
    • View
    • Rating
    • Comments
    • Category
    • Tag
    • Read More
  10. Button text – Add text to the button

Cache

If any of the cache plugins is used on the website, for a proper operation of the post ratings counter, you need to add the following code to the functions.php file:

add_filter( 'cherry_trend_posts_cache_fix', '__return_true' );

Screenshots

  • Widget settings

Installation

  1. Upload cherry-trending-posts folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

And of course, you will find new ‘Cherry Trending Posts’ widget in ‘Appearance – Widgets’ menu in your WordPress admin panel.

FAQ

Installation Instructions
  1. Upload cherry-trending-posts folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

And of course, you will find new ‘Cherry Trending Posts’ widget in ‘Appearance – Widgets’ menu in your WordPress admin panel.

How to use?

It is not enough to install and activate the plugin to make it work properly. You also need to add 2 actions to the template.

  1. do_action( 'cherry_trend_posts_display_rating' ) / do_action( 'cherry_trend_posts_return_rating' ) – display / return HTML for ratings
  2. do_action( 'cherry_trend_posts_display_views' ) / do_action( 'cherry_trend_posts_return_views' ) – display / return HTML for post views counter

For example, in the twentysixteen template you need to add the actions to the template-parts/content-single.php file. In your template the actions can be stored in a different file.

Reviews

Very Useful, But Could Be Better

According to the plugin documentation, you must manually add two actions to your theme before this plugin will work. They tell you which file to change, IF you use a particular free theme, but you have to decide whether to add it to your theme’s index or single or single-post file otherwise.

The code shown (that you need to add) on the plugin page is incorrect. I found the correct code on the GitHub site.

There’s even more code to add if you use a cache. And they didn’t mention it, but trust me – you’ll need to flush that cache before these results will display.

If you’re still with me after all that, know that the posts this widget will show (yes, “widget”, since I found no shortcode, etc. to allow it’s data to be used in a page, etc.) will likely always be the same old posts.

Why? Because people want to see what’s “trending”, so they’ll click on a page shown by this widget. Especially if using “views” as the criteria, just the fact of listing the posts will increase the views and perpetuate their display.

I found no built-in function to add a date filter, so as to limit to only the most recent posts. I had to manually add that code – something that many users may not wish to or be able to do.

With all that said, this plugin serves an important need and seems to have little competition. Hopefully they will keep it updated and make some improvements.

Read all 1 review

Contributors & Developers

“Cherry Trending Posts” is open source software. The following people have contributed to this plugin.

Changelog

1.0.0

  • Initial release