WordPress.org

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 in the WordPress.org support forum. I monitor the forums on an ongoing basis. If you're looking for more advanced paid support, please see details here.

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 plugin also provides you with a set of CSS classes that allow you to style your posts by adding code to the style.css sheet. In a future version, I will be adding in CSS support within the plugins Settings page.

The following CSS classes / IDs are available:

  • tptn_related: ID of the main wrapper div

  • 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'

For more information, please visit http://ajaydsouza.com/wordpress/plugins/top-10/

Shortcodes

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

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.

Can this plugin replace Google Analytics?

No. Top 10 has been designed to only track the number of pageviews on your blog posts and display the same. It cannot 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 truncate 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.2.2
Last Updated: 2015-4-12
Active Installs: 30,000+

Ratings

4.7 out of 5 stars

Support

11 of 27 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says 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,1,1
100,2,2
100,1,1
100,1,1
100,4,4
100,2,2
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
50,2,1
0,1,0 100,1,1 100,2,2
100,1,1 100,1,1 100,3,3
0,1,0
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,1,1
100,1,1
100,1,1
100,2,2 100,2,2
100,1,1 100,4,4 100,1,1
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,1,1