Title: WP Most Popular
Author: MattGeri
Published: <strong>January 24, 2012</strong>
Last modified: August 7, 2018

---

Search plugins

![](https://ps.w.org/wp-most-popular/assets/banner-772x250.png?rev=1920990)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/wp-most-popular/assets/icon.svg?rev=1861383)

# WP Most Popular

 By [MattGeri](https://profiles.wordpress.org/mattgeri/)

[Download](https://downloads.wordpress.org/plugin/wp-most-popular.0.3.1.zip)

 * [Details](https://srd.wordpress.org/plugins/wp-most-popular/#description)
 * [Reviews](https://srd.wordpress.org/plugins/wp-most-popular/#reviews)
 *  [Installation](https://srd.wordpress.org/plugins/wp-most-popular/#installation)
 * [Development](https://srd.wordpress.org/plugins/wp-most-popular/#developers)

 [Support](https://wordpress.org/support/plugin/wp-most-popular/)

## Description

WP Most Popular was born out of frustration in finding a decent plugin which performs
one simple task and that is to rank your most popular blog posts.

The plugin keeps a log of your most popular posts based on views and lets you display
them in your blog theme with custom styling. You can display popular posts from 
the last day, 7 days, 30 days or all time.

It also comes with a sidebar widget to let you display your popular posts on your
blogs sidebar.

If you are a developer and integrate the plugin in to a theme, you will get a lot
more flexibility out of the plugin including the ability to show the most popular
custom post types etc.

This plugin was built and is maintained by [WP Geeks](https://wpgeeks.com). For 
extra documentation, videos, snippets and support, visit the [WP Most Popular](https://wpgeeks.com/product/wp-most-popular/)
product page.

### Usage

There are two ways in which you can use this plugin.

 1. As a sidebar widget
 2. Custom function in your theme files

Using the widget is the easiest way and recommended for most users. If you are a
developer and want to integrate the plugin in to your existing theme, then read 
the information below.

Firstly, the main function which you will need to include in your theme to fetch
the popular posts is called `wp_most_popular_get_popular()`.

You can pass that function the following parameters in array form:

 * **limit** (integer)
    - The number of posts you would like to display i.e. 5
    - Default: 5
 * **post_type** (string) / (array)
    - The post type you would like to display
    - Example: post
    - Default: All post types
 * **range** (string)
    - In what date range would you like to display popular posts in
    - Accepted: all_time, monthly, weekly, daily
    - Default: all_time

Those are the current parameters that the plugin supports. Let’s look at an example
of how to display the most recent popular posts in a unordered list.

    ```
    <?php
    echo '<ul>';
    $posts = wp_most_popular_get_popular( array( 'limit' => 10, 'post_type' => 'post', 'range' => 'all_time' ) );
    global $post;
    if ( count( $posts ) > 0 ): foreach ( $posts as $post ):
        setup_postdata( $post );
        ?>
        <li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?></a></li>
        <?php
    endforeach; endif;
    echo '</ul>';
    ?>
    ```

#### Filters

The following filters are available to you:

 * **wp_most_popular_list_before** – used to filter the

 *  element of the outputted widget list
    * **wp_most_popular_list_after** – used
   to filter the

element of the outputted widget list
 * **wp_most_popular_list_item_single** – filters
for a the list item generated by the widget

#### Fainas

 * **wp_most_popular_list_item** – used for modifying the list output

## Installation

Setting up WP Most Popular is very simple. Follow these easy steps

 1. Upload the plugin to your `/wp-content/plugins/` directory
 2. Activate the plugin in your WordPress admin
 3. Add sidebar widget or integrate functions in to your theme

## FAQ

  Installation Instructions

Setting up WP Most Popular is very simple. Follow these easy steps

 1. Upload the plugin to your `/wp-content/plugins/` directory
 2. Activate the plugin in your WordPress admin
 3. Add sidebar widget or integrate functions in to your theme

  Why are no posts displaying when I use the widget or call the function in my theme?

99% of the time this is because no posts have been visited yet to receive a ranking.
Simply click on a blog post to read it on your blog and it will receive a ranking
and display in the list of most popular posts.

  What are the minimum requirements for the plugin?

You will need a web server or shared host that supports PHP version 5 or newer. 
Javascript is also required to log post views.

  Why does the plugin use Javascript to track the post views?

The original version of the plugin that I wrote used PHP to track the post views
and the reason why I switched to Javascript was because if a caching plugin is enabled
on your blog, the page will be loaded statically to your visitor and the PHP code
to log a view on a post will not be run.

  Can I request a feature?

Yes, please do so on the WordPress support forum for the plugin. I will consider
it and if I feel it is worth adding, I will schedule it for a future release.

  Can I contribute code to the plugin?

Yes! The plugin is open source and I host it on [Github](https://github.com/wpgeeks/WP-Most-Popular).
Feel free to send me pull requests.

  Where can I get support for the plugin?

This plugin is managed by WP Geeks and you can contact our support team on our [website](https://wpgeeks.com).

## Reviews

![](https://secure.gravatar.com/avatar/66a7159e9e38597bc70bc1b230d2a1eae5e8b4a430bdfa1024338fb16438303d?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-22286/)󠁿

 [jensnilsson](https://profiles.wordpress.org/jensnilsson/) July 2, 2019

Works just as expected 🙂 Triggers the stat update from JS on the frontend so it
works with cache.

![](https://secure.gravatar.com/avatar/e13d98070d39eb8a91decc242f0f0f1eb82ad7a414dc8df67745f391d89c285c?
s=60&d=retro&r=g)

### 󠀁[504 request](https://wordpress.org/support/topic/504-request/)󠁿

 [azhar92](https://profiles.wordpress.org/azhar92/) January 5, 2017

Hello Support, I hope you are doing well !!! I have installed this Wp most popular
plugin in my website, my website is on wp-engine server. so server person giving
max hitting creating under this plugin code. so please check this plugin code. i
have some response from wp-engine support so please guide me how to resolve this
issue. ack-grep “wmp_update” plugins/ themes/ plugins/wp-most-popular/wp-most-popular.
php 52: echo ‘<!– WordPress Most Popular –><script type=”text/javascript”>/* <![
CDATA[ */ jQuery.post(“‘ . admin_url(‘admin-ajax.php’) . ‘”, { action: “wmp_update”,
id: ‘ . $wp_query->post->ID . ‘, token: “‘ . $token . ‘” }); /* ]]> */</script><!–/
WordPress Most Popular –>’; 65: add_action( ‘wp_ajax_wmp_update’, ‘WMP_system::actions’);
67: add_action( ‘wp_ajax_nopriv_wmp_update’, ‘WMP_system::actions’ ) I am waiting
your response!!!

![](https://secure.gravatar.com/avatar/177ef66362ea4853cccae28745750a1cbea8c99976546cbad708c55874fca6e4?
s=60&d=retro&r=g)

### 󠀁[Simple and versatile](https://wordpress.org/support/topic/simple-and-versatile-7/)󠁿

 [RustyH](https://profiles.wordpress.org/russhorne/) September 3, 2016 2 replies

Great plugin, can be called with a function to show popular posts anywhere. I was
able to create a category for popular posts and then call the plugin function when
that category was viewed. However, only giving it 4 stars as I’ve realised that 
when the plugin is deactivated, all the database info is deleted, the whole table
for this plugin is gone! This should only happen when the plugin is deleted, not
deactivated.. Deactivation should be viewed as a temporary thing, possibly while
testing another plugin, it shouldn’t remove all the data! If this is fixed it would
be worthy of 5 stars. Thanks.

![](https://secure.gravatar.com/avatar/9b14e1d0aa0c0a0b70859bbb086d0b02aab4e08b1f3adcb9965c0c4b0f4d7cdd?
s=60&d=retro&r=g)

### 󠀁[Good and simple](https://wordpress.org/support/topic/good-and-simple-17/)󠁿

 [webteam](https://profiles.wordpress.org/webteam_tebbens/) September 3, 2016

Simple and elegant: does show the most popular posts, nicely in the theme styling.

![](https://secure.gravatar.com/avatar/ccb4344e32f2762120900f7eb023b4d730a2aa53890f3b95967ad896fba5575c?
s=60&d=retro&r=g)

### 󠀁[Nice idea](https://wordpress.org/support/topic/nice-idea-29/)󠁿

 [Rik0399](https://profiles.wordpress.org/rik0399/) September 3, 2016

Like this plugin, simple, effective. I would also would have liked to place a shortcode(
not filecode) onto a page which would allow to show op/popular listings for each
category. I’ll favourite this for now until such is added. Thank you

 [ Read all 11 reviews ](https://wordpress.org/support/plugin/wp-most-popular/reviews/)

## Contributors & Developers

“WP Most Popular” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ MattGeri ](https://profiles.wordpress.org/mattgeri/)
 *   [ WP Geeks ](https://profiles.wordpress.org/wearewpgeeks/)

[Translate “WP Most Popular” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-most-popular)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wp-most-popular/), 
check out the [SVN repository](https://plugins.svn.wordpress.org/wp-most-popular/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/wp-most-popular/)
by [RSS](https://plugins.trac.wordpress.org/log/wp-most-popular/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.3.1

 * Fixed a bug where the old function `wmp_get_popular` was no longer working as
   it should for backwards compatibility

#### 0.3

 * New helper function name for getting the most popular posts `wp_most_popular_get_popular`.
   Please note that the old function name is still supported `wmp_get_popular`
 * New filters and action introduced for use on widget (wp_most_popular_list_before,
   wp_most_popular_list_after, wp_most_popular_list_item, wp_most_popular_list_item_single)(
   thanks to [sanchothefat](https://github.com/sanchothefat) and [callerc1](https://github.com/callerc1))
 * Widget now supports thumbnails (thanks to [eduardo-marcolino](https://github.com/eduardo-marcolino))
 * Added a CSS class name to the widget list (thanks to [sinisterstuf](https://github.com/sinisterstuf))
 * Fixed a bug where the plugin was using a deprecated function (since version 4.3)
   to setup the widget

#### 0.2

 * Added the ability to query multiple different post types (thanks [inc2734](https://github.com/inc2734))
 * You can now also choose a specific post type from the widget

#### 0.1

 * First version of the plugin released

## Meta

 *  Version **0.3.1**
 *  Last updated **8 years ago**
 *  Active installations **2,000+**
 *  WordPress version ** 3.0 or higher **
 *  Tested up to **4.9.29**
 *  PHP version ** 5.2.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-most-popular/)
 * Tags
 * [most viewed posts](https://srd.wordpress.org/plugins/tags/most-viewed-posts/)
   [most-viewed](https://srd.wordpress.org/plugins/tags/most-viewed/)[popular](https://srd.wordpress.org/plugins/tags/popular/)
   [popular posts](https://srd.wordpress.org/plugins/tags/popular-posts/)[popular posts widget](https://srd.wordpress.org/plugins/tags/popular-posts-widget/)
 *  [Advanced View](https://srd.wordpress.org/plugins/wp-most-popular/advanced/)

## Ratings

 4.9 out of 5 stars.

 *  [  10 5-star reviews     ](https://wordpress.org/support/plugin/wp-most-popular/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/wp-most-popular/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/wp-most-popular/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/wp-most-popular/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/wp-most-popular/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-most-popular/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-most-popular/reviews/)

## Contributors

 *   [ MattGeri ](https://profiles.wordpress.org/mattgeri/)
 *   [ WP Geeks ](https://profiles.wordpress.org/wearewpgeeks/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-most-popular/)