Plugin Directory

Top 10 - Popular posts plugin for WordPress

Track daily and total visits on your blog posts. Display the count as well as popular and trending posts.

If your question isn't listed here, please create a new post at the WordPress.org support forum. It is the fastest way to get support as I monitor the forums regularly. I also provide premium paid support via email.

How can I customise the output?

Several customization options are available via the Settings page in WordPress Admin. You can access this via Settings » Top 10

The main CSS classes / IDs are available:

  • tptn_posts and tptn_posts_daily: Class of the main wrapper div. If you are displaying the related posts on non-singular pages, then you should style this

  • tptn_title: Class of the span tag for title of the post

  • tptn_excerpt: Class of the span tag for excerpt (if included)

  • tptn_thumb: Class of the post thumbnail img tag

  • tptn_list_count: Class of the span tag for post count in top posts list

  • tptn_counter: Class of the div tag that wraps the post count that is driven by the field "Format to display the count in: " under 'Output Options'


You can insert the popular posts anywhere in your post using the [tptn_list] shortcode. The plugin takes three optional attributes limit, heading and daily as follows:

[tptn_list limit="5" heading="1" daily="0"]

limit : Maximum number of posts to return. The actual number displayed may be lower depending on the category / post exclusion settings.

heading : By default, the heading you specify in Title of popular posts: under Output options will be displayed. You can override this by specifying your own heading e.g.

<h3>Top posts</h3>
[tptn_list limit="2" heading="0"]

daily : If set to 1, then the shortcode will return the daily popular posts list

In addition to these attributes, the shortcode can take all the options as attributes. To see the detailed list take a look at the function tptn_default_options() in top-10.php file

You can also display the number of visits using the [tptn_views] shortcode. The plugin takes one optional attribute daily as follows:

[tptn_views daily="0"]

daily : If set to 1, then the shortcode will return the number of daily views

Manual install

You may choose to not display the post count automatically. If you do so, then in order to display the post count, you will need to add <?php if ( function_exists('echo_tptn_post_count') ) echo_tptn_post_count(); ?>.

In order to display the most popular posts, you will need to add <?php if ( function_exists('tptn_show_pop_posts') ) tptn_show_pop_posts(); ?>.

In order to display the most popular posts, you will need to add <?php if ( function_exists('tptn_show_daily_pop_posts') ) tptn_show_daily_pop_posts(); ?>.

You can also use the WordPress Widgets to display the popular posts in your sidebar / other widgetized areas of your theme or use the API to fetch the posts. View an example

Can this plugin replace Google Analytics?

No. Top 10 has been designed to only track the number of page-views on your blog posts and display the same. It isn't designed to replace Google Analytics or any other full fledged statistics application.

How does the scheduled maintenance work?

When you enabled the scheduled maintenance, Top 10 will create a cron job that will run at a predefined interval and clean up old entries from the wp_top_ten_daily table. Note: If you enable this option, WordPress will execute this job when it is scheduled the first time

How to make the columns on the Custom Posts pages sortable?

Add the following code to your functions.php file of your theme.

add_filter( 'manage_edit-{$cpt}_sortable_columns', 'tptn_column_register_sortable' );

Replace {$cpt} by the slug of your custom post type. E.g. to make the columns on your 'projects' post type sortable, you will need to add:

add_filter( 'manage_edit-projects_sortable_columns', 'tptn_column_register_sortable' );

Requires: 3.5 or higher
Compatible up to: 4.4
Last Updated: 2 months ago
Active Installs: 30,000+


4.7 out of 5 stars


14 of 36 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

3 people say it works.
0 people say it's broken.

100,2,2 100,1,1 100,1,1
100,4,4 100,2,2
0,2,0 100,1,1 100,1,1 100,1,1
100,2,2 83,6,5 100,3,3 100,1,1
100,1,1 100,3,3 100,3,3
50,4,2 100,2,2
0,1,0 100,1,1 100,2,2
100,1,1 100,1,1 100,3,3
100,1,1 100,2,2
100,2,2 100,1,1 100,3,3 100,1,1 25,4,1 100,1,1
100,2,2 100,1,1
100,1,1 100,2,2 100,2,2 100,1,1
100,1,1 100,1,1
100,2,2 100,2,2
100,1,1 100,4,4 100,1,1
100,2,2 0,3,0 100,2,2 100,2,2 100,1,1
100,1,1 100,2,2
100,1,1 100,3,3