WP Manifestindependent plugin directory
manifest / analytics / wp-post-popularity

Post Popularity

WordPress plugin which keeps track of all time post popularity

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/marko-stimac/wp-post-popularity/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WordPress plugin which keeps track of all time post popularity. The plugin doesn't do anything else other than that. You can reset post views under Settings->Post Popularity but keep in mind that if you are testing you need to reset your session history as well in order to track the count for already visited post again right away.

How to use

If you want to show the most popular posts you can use following arguments to create a query

$args = array(   
    'meta_key' => 'post_popularity',   
    'orderby' => 'meta_value_num',   
    'order' => 'DESC'   
);   
$query = new WP_Query($args);   

And then inside a loop you can get a view count value like this:

echo get_post_meta(get_the_ID(), 'post_popularity', true);