How to Track and Display Popular Posts in WordPress: A Practical Guide
A popular posts list can get stuck showing the same old articles. I’ve been building Top 10 for nearly 20 years, and choosing which views count matters as much as where you display the results.
Top 10 tracks posts, pages and custom post types, with the data stored in your WordPress database. You can display the results through blocks, widgets or shortcodes.
You’ll need WordPress 6.8 or later, PHP 7.4 or later, and permission to install plugins. The steps below work with the free version.

Installing Top 10
Open Plugins > Add New, search for “Top 10”, then select Install Now and Activate. Network activate it if you want it available across a multisite network.
Both overall and custom-period counters are enabled by default. Tracking starts after activation, though buffered views take time to appear in the counts.
Configuring the tracker
Open Top 10 > Settings and select Counter/Tracker. Two settings do different jobs.
Tracker type controls how the browser sends a view. Leave it on Query variable based unless you have a reason to use REST API based or Ajaxurl based.
Tracking method controls how Top 10 saves that view. The default, Funnel tracking, buffers visits for a background job that merges them into the count tables every two minutes.
JavaScript sends the tracking request separately from the page, so cached HTML can still record views. The trackers’ documentation explains the alternatives.
I turn off Track logged-in users so my own browsing doesn’t affect the list. Enable Do not track bots to filter recognized crawlers, though it won’t catch every bot.
Displaying popular posts
For the block editor, add Top 10 Popular Posts. Its sidebar controls the number of posts, time period, thumbnails, and excerpts, with a preview as you make changes. Alternatively, use the widget.
I use this at the end of long posts on ajaydsouza.com. The blocks’ documentation covers the available controls.
If your theme supports widgets, add Popular Posts [Top 10] under Appearance > Widgets.
For a shortcode, add this to a Shortcode block:
This displays up to five posts or pages ranked by views in the seven-day custom period. Use [tptn_views] to display the current post’s view count; the shortcode documentation lists the other attributes.
Keeping the list fresh
All-time totals favor posts that have collected views for years. A custom period gives recent traffic more influence without excluding older posts that people still read.
Under Counter/Tracker, set Default custom period range using Day(s) and Hour(s). Then enable custom-period output in your block or widget and check its own range, which can override the global default.
For shortcodes, daily="1" selects custom-period output and daily_range sets the days, as in the example above.
With Start daily counts at midnight enabled, seven days means today and the previous six calendar days. Disable it to calculate back from the current time using hourly boundaries.
I use 30 days on most sites. A news site may suit seven days or fewer; an evergreen blog may benefit from 90.
Publication age is separate. Published age of posts on the Posts list tab excludes content older than the number of days you set; zero removes that restriction.
Changing the counting window doesn’t change the publication date filter. Use a custom period when you want to show what readers are viewing now, and add a publication age limit only when you want older articles to stay out of the list altogether, regardless of how many recent views they have received.
When counts stop updating
Open Top 10 > Tools and run Sync Funnel Now. If counts increase, visits reached the buffer and manual aggregation worked.
If nothing changes, read the result message. An empty buffer, an aggregation lock or a database error can explain it, so don’t assume the tracker failed.
Fix Cron Schedules reschedules the background jobs. The Tools documentation explains the available maintenance actions.
If cron remains unreliable, switch to Legacy tracking, which writes counts directly but doesn’t populate the visits log. For failed tracking requests, enable Debug mode, inspect the browser console, and test while logged out if you’ve disabled logged-in tracking.
Where Pro fits
Top 10 Pro adds faster trackers, lazy loading, more block layouts, and native Elementor, Bricks, and WPBakery elements. It replaces the free plugin while keeping your existing counts and settings.
The free version covers the setup above. Get tracking working, choose where the list belongs, and give it a useful counting window.

