Top Posts & Pages Widget

The Top Posts & Pages Widget displays your sites most popular posts & pages according to the stats plugin. The Jetpack plugin is required to use this plugin.

The Top Posts & Pages widget found on inspired this plugin, but this plugin allows more fine-tuning of what type of posts to show.

This plugin is fully localized and a POT file is included. If you would like to help translate this plugin, please contact me.

For support, please contact me in the WordPress Forums, if you find a bug or have a feature request, please create a ticket on the plugins Github Issues page.


Latest version: Download Top Posts & Pages Widget v0.5 [zip]


As with most WordPress plugins, there is two ways of installing this plugin.

Primary Option

  1. Go to your WordPress Dashboard and login as an Admin
  2. From your Dashboard go to Plugins section on the left hand side and select Add New.
  3. Search for Top Posts & Pages Widget
  4. Click the Install Now link and follow the instructions.

Backup Option

  1. Download the latest version from the download page (
  2. Extract the zip file and copy the folder “top-posts-pages-widget” into the “wp-content/plugins/” directory in your WordPress installation.
  3. Activate the plugin from your Dashboard by going to Plugins -> Installed page.

Screen Shots

  1. The widgets options in the dashboard.

    The widgets options in the dashboard.


Version 0.5

  • Correct bug in show pages not being able to be turned off.

Version 0.4

  • Add ‘Show Home Page?’ support to plugin

Version 0.3

  • Rework the post_id setup to better display itemes.

Version 0.2

  • Corrected ‘Number of posts to show’, to now show the correct number of posts.
  • Added wp_cache support.

Version 0.1

  • First Release – Everything’s new

34 thoughts on “Top Posts & Pages Widget

  1. On the Top Posts widget, is it possible to flag certain posts to NOT appear in the listing?

    Like maybe listing the id nbr or partial quote from the post’s title?

    Like in my case, look how different my listing would be if I could exempt posts with “Mummers” in the title.

  2. Guess what? With a matter of a few days the Top Posts were back to normal. That subject, the Mummers Parade, is a big thing on one day a year. New Years day. So it is that around the first of the year those posts get hammered. I was concerned that it would have a lasting effect on the widget’s output but now I see it isn’t much of an issue for me any more.

  3. Is it possible to filter pages? The home page we use on the site where I installed your widget is not the WP home page. I am wondering if there is a way I could keep it out of the list.


    • Greg,
      You should be able to grab lines 57 to 86 of the plugin and drop them into your theme. You will need to add the variables back in, or at least remove the “if” statements in the center of the code block.

      I have never tested this setup so there may be odd output.

      Let me know how it goes.


  4. Top Posts & Pages Widget worked fine on my blog until two days ago when it show wrong url on the sidebar. Here is my link but Top Posts & Pages Widget show this link on the side bar. Pls notice the extra 2012/08/18 link put by this widget. pls help me as i like this widget very much. tqvm.

    • I’m not seeing that right now on you site. The plugin doesn’t modify the URL of your links, only displays what the Jetpack Stats plugin provides it. Im guessing the Stats system had a issue with the URL structure for a short time.

  5. I’ve been using the Popular Posts plugin recently until the counts went screwy and the widget disappeared. 🙁 I liked that plugin (and this one) because they use Stats (Jetpack) for page view counts which are already present on my site. Any chance you can incorporate some of that widget’s features into this one? I’d love to be able to exclude certain post IDs, choose the minimum view count for posts to be listed, and have more control over the output format. Just to name a few. Thanks!

    • I just checked the links to my posts created by your widget. ALL OF THE links generated using this plugin were redirects to sites other than mine.

      There is something seriously fishy here.

      I have deactivated this plugin.

  6. Also seeing the plug-in no longer work. Links are either going to the same page that the user is viewing (if they are on the home page it just sends them to the home page) or it sends them to some third party website. Had to deactivate plug-in out of concern for my site’s readers and the integrity of the site itself. Checked the files via FTP and nothing has been updated to the plug-in files so not sure what the sudden change is from.

    • Hmmm, I’m able see it doing it this on your site. It seems to work for some, but not most right now.

      Was it working correctly at one point then stopped? Do the ‘top posts’ link to the correct post on your Admin side (in the stats plugin)?

  7. Hi Matt,

    The stats plugin should not have any spam links in there for starters. What is happening is that someone ( we don’t know who) has an alias table of the top pages & posts – they then do some kind of lookup & add their spam links so that when you hover over the “Top pages & posts” list in the sidebar you can see the underlying links have been hijacked. I have a copy of the list that has been output but I can’t see that either stats plugin or top posts plugin has been altered. For now have removed this plugin from 2 sites until a fix can be found.

  8. Matt, would it be possible to check the URL returned from jetpack and see if it matches the domain of the site? If it doesn’t match then don’t display that top post.
    Or, since the title of the post is correct, it’s just the url that’s wrong, could you search for that post to get the correct url based upon the title?

  9. I just started using this plugin. I am have been happy with it. However, I do have one question. On my site, some have multiple photos per post. In some cases it will pick up the collage picture instead of my main photo. Is there a way to choose which photo it chooses or to be sure that the collage is not featured since the size seems to impede the view?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.