Top 10 – Popular posts plugin for WordPress


WordPress doesn’t have an in-built system to track page views or displaying popular posts. Top 10 is an easy to use, yet, powerful WordPress plugin that will count the number of page views of your posts, pages and any custom post types. You can then display the page view counts as well as display your most popular posts.

Top10 には2つのウィジェットが追加されており、人気記事のリストとすべての記事の訪問数を表示することができます。

Although several similar plugins exist today, Top 10 is one of the most feature-rich popular post plugins with support for thumbnails, shortcodes, widgets, custom post types and CSS styles. The inbuilt caching system also helps reduce server load by caching your popular posts output. The tracking uses ajax and is thus compatible with most popular caching plugins.

Top 10 also has powerful API and is fully extendable with WordPress actions and filters to allow you easily extend the code base to add new features or tweak existing ones.


  • Page counter: Counts page views on single posts, pages and custom post types on an hourly basis which can then be easily displayed automatically, using shortcodes or functions
  • Popular posts: Display a list of popular posts either for total counts or for a custom period. You can choose how many posts are to be displayed along with loads of other customisation options
  • Gutenberg / Block Editor support: You can find a block called “Popular Posts [Top 10]” with its own configurable set of options
  • Widget ready: Sidebar widgets available for daily popular and overall popular posts. Highly customizable widgets to control what you want to display in the list of posts
  • ショートコード: The plugin includes two shortcodes [tptn_list] and [tptn_views] to display the posts list and the number of views respectively
  • サムネイルのサポート
    • 投稿記事のサムネイルへのサポート。設定ページにて、指定された大きさのカスタムイメージサイズ (tptn_thumbnail) を作成します
    • Auto-extract the first image in your post to be displayed as a thumbnail
    • Manually enter the URL of the thumbnail via WordPress meta fields. Specify this using the meta box in your Edit screens.
  • Exclusions: Exclude posts from select categories from appearing in the top posts list. Also exclude posts by ID from appearing in the list
  • Styles: The output is wrapped in CSS classes which allows you to easily style the list. You can enter your custom CSS styles from within WordPress Admin area or use the style included.
  • Admin interface: View list of daily and/or overall popular posts from within the dashboard. Top 10 also adds two sortable columns to your All Posts and All Pages pages in your WordPress Admin area
  • Export/Import interface: Export the count tables and settings to restore in the same site or on other installs
  • Works with caching plugins like WP-Super-Cache, W3 Total Cache or Quick Cache
  • Extendable code: Top 10 has tonnes of filters and actions that allow any developer to easily add features, edit outputs, etc.


Top10 は GDPR に準拠しており、インストール時に訪問者の個人情報を一切収集しません。データベースの wp_top_10 テーブルと wp_top_10_daily テーブルに保存するデータを確認できます。注: 接頭辞 wp は、デフォルトから変更した場合は異なる場合があります。

web サイトがすべての GDPR 要件を満たしていることを確認する責任があります。


I spend a significant amount of my free time maintaining, updating and more importantly supporting this plugin. If you have been using this plugin and find this useful, do consider making a donation. This helps me pay for my hosting and domains.


Top 10 is available for translation directly on Check out the official Translator Handbook to contribute.


Top 10 is also available on Github
So, if you’ve got some cool feature that you’d like to implement into the plugin or a bug you’ve been able to fix, consider forking the project and sending me a pull request. Please don’t use that for support requests.


  • Top 10 options - General options
  • Top 10 options - Counter and Tracker options
  • Top 10 options - Popular post list options
  • Top 10 options - Thumbnail options
  • Top 10 options - Styles
  • Top 10 options - Maintenance
  • Top 10 options - Feed
  • Top 10 widget options
  • Top 10 Meta box on the Edit Post screen
  • Top 10 Tools page
  • Top 10 - Popular posts view in Admin
  • Top 10 Export/Import interface
  • Top 10 - Popular posts view in Network Admin



  • Top 10 Popular Posts Display the Popular Posts


WordPress install (the easy way)

  1. Navigate to Plugins within your WordPress Admin Area

  2. Click “Add new” and in the search box enter “Top 10”

  3. Find the plugin in the list (usually the first result) and click “Install Now”

Manual install

  1. Download the file from this release post
  2. Visit Plugins in your Admin Area
  3. Hit the Add New button next to the Plugins heading
  4. Hit the Upload button next to the Add Plugins heading
  5. Select the file that you downloaded and hit Install Now
  6. Activate the Plugin in WP-Admin.
  7. Go to Top 10 » Settings to configure
  8. Go to Appearance » Widgets to add the Popular Posts sidebar widget to your theme
  9. Go to Top 10 » View Popular Posts to view the list of popular posts


WebberZone ナレッジベースの FAQ をご覧ください。
フォーラムを巡回しているため、サポートを受けるのが一番早い方法です。また、E メールによるプレミアム 有料 サポートも提供しています。

How can I customise the output?

Details on how to use and customize the output is in this knowledge base article



Can this plugin replace Google Analytics?

いいえ。Top 10は、投稿記事のページビュー数を追跡し、同じ記事を表示するように設計されています。Google Analytics やその他の本格的な分析アプリケーションを置き換える目的では設計されていません。

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 Post Type admin 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' );


Using WordPress, I created a reusable block and add the most popular posts over the last 24 hours to the end of every news story (it's a news site). Since adding that feature, my page views and time on site have nearly doubled, it helps to present my readers with other posts that are relevant at the time. Even if someone finds a news article that is a few years old through a web search, at the end of the article it will display the most current trending stories to encourage people to keep reading. Works great. I recommend.
2022年6月10日 1 reply
Good plugin, good technical support. Congratulations to the author/authors. Cheers!
2021年5月25日 1 reply
This plugin works well with paremeters useful, and good widgets also. The plugin is easy to install and configure. I'm not a developper and I really appreciated to receive fast support when needed, this is the case here. Big Thank you!
2021年5月11日 2 replies
This does exactly what it promises and does it well. I have used it for the past four years and I've had little issue with it. The only complaint, small, is its CSS practices and a few inconsistencies. It uses several CSS properties with "!important" attributes which isn't exactly an efficient practice -- and ignored by frameworks like AMP that emphasise lean code (to clarify, the plugin author offers a good explanation for why he does that in their response below). Thumbnail options in the plugin settings also have no effects on thumbnails in widgets. I dequeued its stylesheet and added styles to a custom stylesheet, and they still apply with !important. Otherwise, it's the best plugin for what it does -- lean and efficient.


Top 10 – Popular posts plugin for WordPress はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。


“Top 10 – Popular posts plugin for WordPress” は3ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Top 10 – Popular posts plugin for WordPress” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。



Release post:

  • Two minor security fixes


  • Security fix when clearing the cache


  • Security fix in block


  • Enhancements/Modifications:

    • Dashboard widget will display the number of posts set in the Top 10 Settings page
  • バグ修正:

    • Tax query parameter was not set in Top_Ten_Query
    • post_type parameter was not set in Top_Ten_Query
    • Parse error in some PHP installs prevented the plugin from being activated
    • Fixed missing stylesheet error when text_only style is selected
    • Only from categories option in the Widget now takes a comma-separated ID list only as the autocomplete was not compatible with the new widget interface


  • Enhancements/Modifications:

    • Modified behaviour of Popular Posts page and Admin Dashboard widgets to limit to public post types
  • バグ修正:

    • Fixed: Fatal error: Uncaught Error: Call to undefined function restore_current_blog()


  • Features:

    • New setting in the Popular Posts block to select the style by block type
  • Multisite improvements:

    • Retrieve the popular posts across multiple blogs by passing multiple blog IDs to Top_Ten_Query
    • New Tools page and Import/Export page in Network Admin – you can find this in the Top 10 menu
    • Resetting the Popular Posts or Daily Popular Posts will apply to the current site in the Admin screen and across the network in the Network Admin screen
    • Exporting/Importing tables will apply to the current site in the Admin screen and across the network in the Network Admin screen
  • Top_Ten_Query improvements:

    • WP_Query’s arguments posts_per_page, post_type are prioritised
    • New filters: top_ten_query_date_query, top_ten_query_meta_query, top_ten_query_meta_query_relation, top_ten_query_tax_query_relation, top_ten_query_posts_fields, top_ten_query_posts_join, top_ten_query_posts_where, top_ten_query_posts_orderby, top_ten_query_posts_groupby
    • Cache key is generated from the query_args instead of just the input_query_args
  • Other Enhancements/Modifications:

    • New function: get_tptn_table(); Code has been refactored to use this function
    • Popular Posts page in Admin or Network Admin use the same class Top_Ten_Statistics_Table. Deleted Top_Ten_Network_Statistics_Table
    • Selecting “Text only” thumbnail setting or style will not display a thumbnail
    • Use moment.js bundled with WordPress
    • Updated ChartJS and ChartJS Data Labels plugin scripts to latest versions
  • Bug fix:

    • Scripts/styles didn’t load in Network posts page


Release post:

  • Bug fixes:
    • Updated moment.min.js
    • Fixed PHP errors when editing a post in Gutenberg


  • Features:

    • New filter tptn_show_meta_box that can be set to false to disable the Top 10 meta box on Edit screens
    • New option to exclude the current post from the list
    • New option “Exclude on Categories” to disable the display of the popular posts on selected categories
  • Enhancements/Modifications:

    • Optimised import of tables particularly for larger imports
    • Added wpml-config.xml file that will allow settings to be translated with WPML and PolyLang
    • Upgraded block to the latest API
    • Upgraded thumbnail display. If default image is disabled, then the site icon will be displayed if available
    • Admin dashboard counts match with the Popular posts listings
    • Updated chartjs to the latest version
  • バグ修正:

    • Fixed PHP notice on widgets.php page due to the block
    • Widget checkboxes are not saved in WordPress 5.8
    • post__in argument will now remove any false/0 values
    • Disabling/enabling author tracking didn’t always work
    • WP Multisite: Creating a new blog with automatically configure the plugin
    • Widget incorrectly included all post types when no post types were selected instead of using the global settings
    • Current post was incorrectly excluded when translation functions were run


Release post:

  • Features:

    • New Top_Ten_Query class for fetching popular posts. Adds the function get_tptn_posts() which replaces get_tptn_pop_posts() which will be deprecated in a future version
    • New option to exclude the Front page and Posts page if these are set in Settings > Reading or via Customizer
    • New option in the Widget to include specific post IDs in the top lists. You can also use them in the shortcode using include_post_ids
    • New block for Gutenberg aka the block editor. The block is called Popular Posts [Top 10] and you can find it under the widgets category
    • Top 10 now supports the WP REST API. The plugin adds a new tracker type called REST API based which you can find under Counter/Tracker settings. Additionally, you can now receive the popular posts via a REST Request to top-10/v1/popular-posts
  • Enhancements/Modifications:

    • No popular posts feed will be added if the corresponding slug is set to blank
    • Changed sum_count to visits
  • バグ修正:

    • PHP notices when displaying Network Wide Popular Posts in WordPress Multisite
    • Query based tracker gave an ajax error

For previous changelog entries, please refer to the separate changelog.txt file or Github Releases page