Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

Display Popular Posts by Day, Week, Month, and All Time in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
Display Popular Posts by Day, Week, Month, and All Time in WordPress

A user in our facebook community asked if we could show how to make a page that display popular posts by day, week, month, and all time in WordPress. We have decided to take it a notch higher and decided to add the tabber aspect in it as well. So in this article, we will show you how to add a tabber with popular posts by day, week, month, and all time in your WordPress sidebar without editing a single line of code. We will also show you how to create a separate page that displays popular posts by day, week, month, and all time in your WordPress blog.

How to Add a Tabber with WordPress Popular Posts

Normally, you would have to add bunch of jQuery code, add your own CSS, get down and dirty with the codes in WordPress files only to waste time and build frustration. So in this technique, we will be adding a tabber in our WordPress sidebar that lets you display popular posts by day, week, month, and all-time. To accomplish this, we will be using the plugin called WordPress Popular Posts, and Tabber Tabs Widget.

Note: In order for this technique to work, your theme must be Widgets Ready.

Lets go ahead and install/activate these WordPress plugins.

Now head to your Widgets screen that can be found Appearance » Widgets. Here you will see two widgets added (one is called Tabber Tab Widgets and the other is called WordPress Popular Posts).

Tabber Widgets

You will also see a new widget location added in the right called “Tabber Tabs Widget Area”. Drag the WordPress Popular Posts widget in this location. Set the title to Daily, time range to today, select your sorting options, how many posts you want to show, and save the widget. Repeat this process 3 more times, so you can have one tab for each time range (daily, weekly, monthly, all-time). The final view should look like the image below:

Tabber Tabs Widgets Area

Now look in the widget locations, you should see another one called Primary Sidebar or something similar. Drag your Tabber Tabs Widget into this location. Select the style you want, and save this sidebar. If your theme does not have a widget ready sidebar, you should consider asking the theme developer to add it, or switch to a theme that follows WordPress standards like the Standard Theme.

Note: Do not drag Tabber Tabs Widget into Tabber Tabs Widget Area.

Tabber Tabs Widgets

The final outcome of this would look like this:

Tabber Preview

That wasn’t so hard was it? Now you can attract attention to your most popular posts in the sidebar and make them even more popular.

How to Add a Separate Page with Popular Posts

This technique requires you to know the basics of HTML/CSS and a fair understanding of how WordPress themes work. We will use the plugin called WordPress Popular Posts, and the custom page templates technique to accomplish our goal.

Once you have installed the plugin, go to Settings » WordPress Popular Posts. There is a help section that you want to keep open as you do this because you will be referring to the tables in there.

Use our Custom WordPress Page Template technique, to create a new page template. Add the appropriate styles to match your main blog theme. Then paste the code:

<?php get_mostpopular("range=daily&limit=10"); ?>

This will display the 10 most popular posts of the day. If you just want to have one page with a list of popular posts, or want to add this popular posts section to your Archives page, then you probably want to add other attributes to it as well. You can find other attributes in the help section of this plugin that we mentioned above. There is a huge table that shows you each attribute.

You can change the range to weekly, monthly, alltime. You can also add excerpts to each post, display a thumbnail next to them, and you can even display post ratings (if you follow our tutorial on how to add post ratings in WordPress).

You can also take this technique to the next level by creating 4 different pages for each time range. You can also customize it and add it to your Facebook page by creating an app. The possibilities of using this to your advantage are endless.

We hope this tutorial helped you. If it did, then please help us and your friends by sharing it with them on Twitter and Facebook.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Svet VA says:

    Who can write a tutorial how to make, on php site, two blocks ?
    1. Related Posts (with Thumbnails)
    2. Most Popular Posts (with Thumbnails)

  2. John says:

    Unfortunately, this combo doesn’t work anymore with the newest WordPress (3.8.1). Nothing at all shows up. No title, no popular posts, nothing.

  3. Sagar Pansare says:

    Tabber Tab is really good widget i also modified widget according to my requirements

  4. Frank Mcgrath says:

    ok, I did as told above and working smoothly. But how does I show collective title all over tabs as Popular posts??

  5. Bojan says:

    Is it possible to rearrange this plugin to show-up Today’s post instead of Popular ones?

    What I need is a plugin able to show local broadcasting station schedule, according to today’s day. This will be shown in sidebar through widget, or some shortcode.


  6. PachoRivera says:

    Hi, i just used this code “get_mostpopular “into my widget´s theme and it works, but now i need to display the thumbnails. Can someone help me?

    • wpbeginner says:

      @PachoRivera The option to add thumbnail is one of the parameters for this plugin. If you go in plugins settings there is a list of links in help section. The last one that says [wpp] << that one has parameters for thumbnails that you can add.

  7. DonOfTheWorld1 says:

    Sorry, but can someone please share the attributes of this plugin ‘WordPress Popular Posts’ …. I can’t find it in its settings page… thank you !

    • wpbeginner says:

      @DonOfTheWorld1 They are in the settings page. Scroll towards the bottom. There is a table. It is one of those options.

  8. Barzrul says:

    Mine is displaying “Sorry, no data so far” for almost a month.

    What is wrong?

  9. wpbeginner says:

    @xiang208 It takes a while for the plugin to generate data. The data relies on which posts your users are viewing the most. So in a day (you should have some results showing there)….You can always influence the ranking by refreshing one post a few times…

  10. xiang208 says:

    Hi, I have follow your instruction to install in my site. However it displayed “Sorry, No data so far”

    What should I do to retrieve the data?

  11. Crysislevel says:

    tabber tabs is a very gud tutorial. i currently use only wordpress popular plugin..i never knew about this trick. thanx a lot! :)

  12. Linda says:

    Trying it on a client’s site… does not work only get blank area where you should be seeing popular posts… Using WP 3.1.2

  13. Rafaella Wong says:

    It seems that you have some bugs with his widget on the StudioPress Genesis Framework

  14. Rajesh says:

    Thanks for these tips. I am using MystiqueR2 theme These theme provides these features by default.

  15. Praveen says:

    My blog looks cool with this widget ;)

  16. Vadim says:

    Great plugin, only problem is that I can not find any area to say that this is POPULAR POSTS. There are no such field like “TITLE”, so I’can not give proper name to this widget area.

    • Editorial Staff says:

      Yes that is an issue this widget doesn’t solve… you would have to hack it to make it work right. It can be as simple as adding a text widget above it with the title. Use the php tags instead of the default widgets…

      • JM says:

        Thanks for the tutorial! Lovely widget and I added it to my blog. I too, unfortunately, don’t know how to add a “Popular Posts” title to the widget as a whole like Vadim.

        Could you elaborate on using PHP tags instead of default widgets? Are you saying write PHP code within a text widget, or go into the Plugins Editor and change the code there?

        • Editorial Staff says:

          You can edit the plugin but that is not ideal. You can register a new widget location, and then add the titles in there… Search our site for registering custom sidebars, and it should come up.

  17. John says:

    It broked my sidebar theme arthemia

  18. AL@webmedia says:

    Vey nice widget combination tip. I think it’ll even be more powerful when you use it with Widget logic to make appear on the pages and post that you want.

    Great tutorial though.

  19. shyam jos says:

    Tabber Tabs Widget is really great

  20. Yui says:

    Hmm what about say for search results? Or for each category, is that possible?

    Eg, I’m in the category “tutorials” and I want to sort the posts by most popular weekly, daily, monthly and all time.

    Eg 2, I’m searching and want to filter the results based on popularity of weekly daily monthly all time.

    Last question, what is popularity based on? Comment count or view count? If its comment count, is it possible to do one with view count as well?

    • Editorial Staff says:

      Your questions sounds like that you have not installed the plugin. Because it guides you through the process. It lets you sort via comment count or view counts. You can also pick categories as well. You can have as many widgets as you want.

      • Yui says:

        Ah I see, and well you’re correct :P I haven’t had much time, just sorting out all the files and thoughts before I get started on my project :) Thanks though for answering my question :) Great job.

  21. Mike Panic says:

    The problem with this is it Tabber completely takes over your sidebar widget, removing all the other items I already have there.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.