Popular Posts Tabbed Widget for Jetpack

This plugin adds a new widget in the Widgets page. When placed on the sidebar, this displays a tabbed widget showing most viewed (Popular tab), most commented (Comments tab) and most recently published (Latest tab) blog posts.

The Popular and Comments tab when it loads will show all time most popular posts by page views and comments . These two tabs also has sub-tabs Today, Week, and Month that when clicked will show the most popular posts for the day, the last 7 days, and the last 30 days.

Popular posts tab uses page views data from the Jetpack Stats module. And yes, you need to have Jetpack plugin activated and connected to a WordPress.com account in order for the popular posts tab to show anything.

There are also plans to provide options to get popular posts data from WordPress Popular Posts plugin. But that’s for later.

Click here to download the plugin.

Screenshots

Screenshot image

Screenshot of the tabbed widget in the front-end

Screenshot 2

Screenshot of the widget settings in the backend.

Click here to download the plugin.

42 comments

  1. Hi there,

    great plugin, but I cannot translate the interface my readers see.
    I have tried with “codestyling localization”, but the relevant strings do not appear.
    I have also had a look at the code, but strings such as “week”, “today”, etc. appear many times and before I embark on a biggish job, I would like to make sure I am doing the right thing.

    Aslo, is there a way to display the pageviews?

    TIA

  2. OK, update… I have translated the tabs under popular editing the plugin file. Thankfully it worked fine.

    Now I am left to translate “POPULAR”, but I am not sure where it is. Any advice?

    TIA

  3. Hi there,

    yes, actually I had done it last night and it worked. There are several ‘Popular’ (not sure what they are for), but I have managed to find my one. :) The only downside is that if you update the plugin I will have to redo the work from scratch.

    I’ve also been playing a bit with the CSS so now the widget blends a bit better with the rest of my site (but that is with my custom CSS, so it should be safe).

    One thing… in changing the background colour I got the bullet points out :( Any idea how I can remove them, at least from the horizontal bar?

    Also, any chance of getting the number of views? I would imagine the information is kind of known because you manage to get the most read posts, so it should be just a matter of visualizing it. Is that right?

    Now I’ll start playing with the other tabs.

    GREAT plugin indeed.

    1. sorry been lazy about internationalizing the plugin :D

      No worries though as I’ll definitely work on making the plugin translatable on next update so you should be able to use the localization plugin next time.

      bullet points – seems like your theme wants to impose it’s bullet points :D although not sure how changing the background color could affect the bullet points. that most likely indicates a typo in the css file somewhere.

      anyway, you could send me link to your site and I could give you a hand with the css. or you could ask in WP forums. this is mainly a styling issue.

      Page Views – yup. will be added on next update (if I don’t forget)

  4. Hi again,

    the bullet points appeared when I removed the black background from the “today-week-month” bar. Really not sure why…
    My site is:
    http://www.autosvezzamento.it/blog
    at the moment I have another tabbed widget as well, but I think that will go… :)

    Thanks again. Yours seems to be the best “popular post” plugin around :)

    1. Thank you for the kind words Andrea :)

      Anyway, also not sure how removing the background could make the bullet points appear, but here’s something you can add to your custom.css file:

      .widget .pptwj-tabs-wrap ul{ list-style: none outside none; }

      and oh, you may want to also display the page views in your posts. I just found this plugin yesterday: http://wordpress.org/extend/plugins/jetpack-post-views/ you might want to use that for showing page views in your single posts..

  5. That worked like a treat :) Thanks very much indeed.

    If I am not too much of a nuisance, perhaps you might want to consider changing the way the thumbnails are displayed. You have them square (which is fine), but rather than selecting the central bit of them, it shrinks them to make them fit, meaning they are distorted.
    Compare for example the way they are displayed in your plugin and the woo one above it.

    http://www.autosvezzamento.it/blog

  6. One more question…
    I have noticed you list only the posts, NOT the pages… I wonder if you should add the pages as well (at least give the option through a check box). I think the change would be pretty straightforward.
    Funnily enough I am not sure myself of what I would like :)

  7. Great plugin! But the issue is that at times it just gets stuck at “Loading” and the popular and latest show together which doesn’t look good. I wish you could fix that.

    Another thing is I had to change the css so if you have any updates, not sure how to retain the css changes I made.

    1. to retain your css changes, you’ll want to add your custom css via your theme (if it’s custom), or through JetPack’s Custom CSS module.

  8. Nice Plugin !…..Is there any shortcode available for this plugin, because i can use it in my pages and i can customize it in my own style

    1. You can use add_shortcode hook from where plugin generates its output, that is shown on front. put that code between this function. and its works

  9. Hi there,

    Great work, but I am having issues. Why am I not seeing the way it looks on your site? I have Jetpack installed.

    Please advise.

    Many thanks in advance.

  10. Nice plugin – thanks! But I am having *one* problem. :(

    I find that the the “Popular” list (whether it defaults to popular or not) contains duplicates the first time it displays. Everything fixes itself if I press “Daily / Weekly / Monthly / All” but that initial list is wrong and can contain duplicate entries.

    Even weirder… that initial display doesn’t match any of the Daily / Weekly / Monthly / All options – so *what* is it displaying?

    Is it possible to fix this? My site is at grahamcluley.com

    Cheers

    1. not sure where the duplicates are.. here’s a screenshot of the widget right after loading http://snag.gy/qYIfv.jpg

      anyway, I use the same code as what Jetpack uses to display stats in the backend.. well almost anyway.. but it’s pretty simple since all the plugin does is *ask* the stats server which posts are the most popular in X number of days..

      anyway, send me a screenshot when you see a duplicate :)

      1. Thanks for taking the time to reply.

        Here’s a screenshot of the widget showing duplicate entries:

        http://orbt.io/OfSw.png

        If it’s relevant, I’m using Chrome.

        I think the problem is associated with the initial display of the widget. Although I have told the widget to display “Today”‘s most popular posts, it actually displays different results than if I manually click on Today, This Week, Month, or All.

        All of the date filters work, it’s the *initial* display of the widget which appears to be somewhat more broken.

        Thanks for looking into it.

        Graham

  11. Hi there,

    at times on my blog I see duplicates as well, but I never understood what triggers them and as after a while they go I just ignore them.
    I have just checked and I don’t have them now, but next time they appear I’ll take a screenshot.

  12. Hey, I really like the widget. One question: Is it possible to customize the color scheme at all? I don’t know much about coding… Thanks!

    1. Hi Tyler, yes it’s possible. you can add your own custom css to your website. You can ask for help with in some of the CSS forums like http://css-tricks.com/forums/ or in the themes and templates forum section of wordpress.org http://wordpress.org/support/forum/themes-and-templates

      and oh, it’s also best practice to add your custom css separately from your theme’s css so your changes doesn’t get wiped out when you update the theme or change the theme. JetPack has a Custom CSS module you can use that.

  13. Hello there, love your plugin! How would I change the name of the tabs? For instance I would love to change the word “Popular” into something like “Most Popular Posts”.

    Adventurous greetings,
    Coen

    1. could you post screenshots of both the popular list in the plugin and in jetpack? are you sure they are the same time? i.e. last 7 days, all, today, last 30 days..

  14. Here’s a tips for anyone who have issues translating the plugin through Codestyling Localization:

    1. Go to the plugin and open popular-posts-tab-widget-for-jetpack
    2. Add the following on line 25 (or something like that)


    load_theme_textdomain( PPTWJ_DOMAIN, PPTWJ_URL . '/languages' );

    That makes it possible to add po-files through Codestyling localization and then it’s simply do the translations.

    (thanks for a great plugin, btw!)

    1. Apperantly, that didn’t work. :/ First thing I was posting the woring function. *face palm*

      I think there ar several things breaking translation. First up, I cant find any loading of text domains and second; all items that is wrapped in translation tags are using a constant for the textdomain.

      1. Honestly, I’m not very sure how to do WP translation yet :D but what I do know is, you need to wrap all items in your own domain or something – using a constant (pptwj)

  15. I installed your popular side bar tab widget but the popular is always remain checked and does not show up in the website. Any solution for it.

  16. Hi Ryann, really love this plugin but I need to translate a few things before I can use this. Any idea how I can translate visible words like Popular and Latest (backend stuff isn’t important, only the visible stuff frontend) without losing all the stuff every time the plugin is updated?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-spambot Quiz:

Notify me of followup comments via e-mail. You can also subscribe without commenting.