WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress Popular Posts

With WordPress Popular Posts, you can show your visitors what are the most popular entries on your blog.

  1. Download the plugin and extract its contents.
  2. Upload the wordpress-popular-posts folder to the /wp-content/plugins/ directory.
  3. Activate WordPress Popular Posts plugin through the 'Plugins' menu in WordPress.
  4. In your admin console, go to Appeareance > Widgets, drag the WordPress Popular Posts widget to wherever you want it to be and click on Save.
  5. (optional) Go to Appeareance > Editor. On "Theme Files", click on header.php and make sure that the <?php wp_head(); ?> tag is present (should be right before the closing </head> tag).

That's it!

-SHORTCODE-

If you want to use WordPress Popular Posts on your pages (a "Hall of Fame" page, for example) please use the shortcode [wpp]. By default, it'll list the most viewed posts (up to 10) in the last 24 hours. However, you can change the output and the time range by passing parameters to the shortcode (optional). You can find the full list of available parameters via wp-admin > Settings > WordPress Popular Posts > FAQ.

Usage:

[wpp]
[wpp attribute='value']

Example:

[wpp range=daily stats_views=1 order_by=views wpp_start=<ol> wpp_end=</ol>]

-TEMPLATE TAGS-

wpp_get_mostpopular

With the wpp_get_mostpopular template tag you can embed the most popular posts of your blog on your site's sidebar without using a widget. Optionally, you can pass some parameters to this function so you can customize your popular posts (for a complete list of parameters, please go to wp-admin > Settings > WordPress Popular Posts > FAQ).

Warning: other users have reported that using this template tag on PHP widgets such as Linkable Title HTML and PHP widget and others might not render the PHP code correctly, making the wpp_get_mostpopular template tag fail and return "Sorry, no data so far". I suggest using it directly on your theme's sidebar.php file to avoid issues.

Usage:

Without any parameters, it will list the most viewed posts (up to 10) in the last 24 hours:

<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular(); ?>

Using parameters:

<?php if (function_exists('wpp_get_mostpopular')) wpp_get_mostpopular("range=weekly&order_by=comments"); ?>

wpp_get_views()

The wpp_get_views template tag retrieves the views count of a single post/page. It accepts two parameters: the post ID (required), and time range (optional). If time range isn't provided the function will retrieve the total amount of views, otherwise it'll return the number of views received within the selected time range.

Usage:

<?php if (function_exists('wpp_get_views')) { echo wpp_get_views( get_the_ID() ); } ?>
<?php if (function_exists('wpp_get_views')) { echo wpp_get_views( 15, 'weekly' ); } ?>

Requires: 3.3 or higher
Compatible up to: 3.6.1
Last Updated: 2013-8-18
Downloads: 708,988

Ratings

4 stars
4.1 out of 5 stars

Support

1 of 31 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

2 people say it works.
1 person says it's broken.

100,6,6
89,9,8 33,3,1
100,4,4 0,2,0
0,1,0 42,12,5 100,3,3 60,5,3 0,2,0
80,10,8 93,14,13 100,1,1 0,3,0
100,5,5 44,9,4 40,5,2 100,2,2 85,13,11
87,38,33
33,3,1
58,12,7
67,6,4 0,1,0
50,4,2 0,1,0
63,24,15
50,4,2
75,4,3
86,7,6
100,1,1 100,1,1
100,2,2
87,15,13 60,5,3 34,29,10 25,4,1 75,4,3 100,1,1
0,3,0 100,5,5
96,25,24
100,1,1 71,17,12 50,2,1 100,1,1
50,2,1 100,1,1
100,1,1 86,7,6 14,37,5 43,7,3 100,1,1
100,1,1 50,2,1 61,33,20 100,1,1
33,6,2 100,1,1
100,1,1 64,11,7 100,1,1 100,1,1 43,7,3 100,1,1
20,5,1 33,3,1 50,2,1
50,2,1 67,6,4
100,3,3
50,2,1
60,5,3
67,3,2
43,7,3
100,1,1
67,3,2