The Top Posts & Pages Widget allows you to display either your most liked posts or up to ten posts that have received the most traffic in the past 48 hours.
Here’s an example of what the widget looks like:
Configuring the Widget
Make sure you have the Extra Sidebar Widgets feature enabled in Jetpack -> Settings and add the “Top Posts & Pages Widget” widget to the sidebar of your choice.
Customize the Widget
In addition to the options available in the widget options, you can use filters to customize the look of the widget on your site:
- 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 anywhere on your site
You can use the [jetpack_top_posts_widget]
shortcode in posts and pages. You can also add that shortcode directly to your theme template files, like so:
<?php echo do_shortcode( '[jetpack_top_posts_widget]' ); ?>
The shortcode includes parameters allowing you to change widget options:
[jetpack_top_posts_widget types="post,page" count="2" display="grid"]
![](http://pixel.wp.com/b.gif?host=jetpack.me&blog=20115252&post=10188&subd=jetpackme&ref=&feed=1)