Display either your most liked posts or your ten highest-traffic posts in the past 48 hours.
Add the Top Posts and Pages Widget
To add the Top Posts and Pages Widget, follow these steps:
- Activate the Extra Sidebar Widgets feature.
- Visit your dashboard.
- Navigate to Appearance → Customize → Widgets and search for “Top Posts & Pages”.
- Click to add it to any widget area.
Customize the Widget
In addition to the widget options, you can add filters to your shortcode to customize the look of the widget on your site:
jetpack_top_posts_widget title="Top Posts" count="3" types="post" display="grid"
Change the title, count, types, and display as desired.
- Learn how to filter the number of days used to calculate Top Posts
- Add data before or after each post in the widget
- Change the size of the thumbnails in the Top Posts Widget
Display the Widget
Use the jetpack_top_posts_widget shortcode in posts and pages to show the widget anywhere on your site. You can add the shortcode directly to your theme template files using the following code:
echo do_shortcode( '[jetpack_top_posts_widget]' );
Troubleshooting
Why isn’t my Top Post Widget updating?
If your Top Posts Widget isn’t updating, your site may have an expired transient that is not being deleted as it should be. To solve the issue, try the following steps:
- Install the Transients Manager plugin.
- Search for any transient that starts with
jetpack_restapi_stats_cache_followed by a random string of characters. - Delete any of these transients.
- Check whether your Top Post Widget has been refreshed.
Transients Manager is a third-party plugin. Since Jetpack does not own or develop this plugin, we aren’t able to troubleshoot it and we are not responsible for updating it.
Still need help?
Please contact support. We’re happy to advise.