Support » Plugins and Hacks » Jetpack by WordPress.com » "Top posts" sidebar widget limit bug

  • Resolved azn137

    (@azn137)


    No matter how many posts I set in the setting that’s between 10 and 20 (inclusive), it keeps defaulting back to 9 posts in the front page.

    If I lower it down to between 1 to 9, it displays the total number of posts correctly on the front page.

    Obviously, anything above 20 will be reset to 10.

    I think there might be a bug in the top-posts.php file. Amirite?

    http://wordpress.org/extend/plugins/jetpack/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    Could you have a look at your Jetpack Stats, and check the Top Posts module? If the module doesn’t display more than 9 posts, you won’t be able to display more pages in the widget.

    Ah so it grabs the posts from that module except the home page? http://imgur.com/vxhdxAY

    If that’s the case, I guess it’s working as designed.

    Is there a way to make it *not* display pages?

    Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    Ah so it grabs the posts from that module except the home page? http://imgur.com/vxhdxAY

    If that’s the case, I guess it’s working as designed.

    It does grab the posts from that module. When you click on the “Other Posts” link at the bottom of the module, do you see more Popular posts?
    If you do, could you let me know your site URL so I can have a look?
    If you want it to remain private, you can also contact us via this contact form:
    http://en.support.wordpress.com/contact/?jetpack=needs-service

    Is there a way to make it *not* display pages?

    It is currently not possible. The widget uses data from all pages on your site, Posts and Pages.
    If you want to exclude Pages from the widget, you can use another plugin, like this one:
    http://wordpress.org/extend/plugins/top-posts-pages-widget/

    Oh no problem, thank you for looking into this. Here are the screen shot for today. The list goes on in the module.

    http://imgur.com/nAootj9

    http://imgur.com/yIS73Xs

    My site is fstoppers.com

    Thanks again!

    Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    Would you mind sending an email to support@jetpack.me? I’d like us to run some tests on your site, so we can understand why you can’t display more than 9 posts in that widget.

    I have the same problem, only 9…

    also i can change the size on thumbnails?

    The workaround, I believe, is to modify the top-post.php:151

    $posts = $this->get_by_views( $count );

    to be whatever the number of post you want

    $posts = $this->get_by_views( 15 );

    As for the thumbnail size, the code is on line 146

    $get_image_options['avatar_size'] = 64;

    I’ve changed mine to be 64px. But this will break the layout, so you’ll have to mess with the CSS file too. widget-grid-and-list:92

    .widgets-list-layout .widgets-list-layout-blavatar {
    	float: left;
    	padding-right: 8px;
    }
    
    .widgets-list-layout-links {
    
    }

    None of this is recommended, as the modifications will revert once you update the plugin. I’ve been backing things up as I updated it until a fix is in place.

    Not working 🙁

    Still on 9 posts and now take more time on load the widget :/

    The thumbnails needs a regenerate?

    It takes a few minutes for the plugin to calculate and return new posts.

    The thumbnails get generated automatically from WordPress/JetPack server, so you don’t need to do anything else.

    This bug doesn’t seem to have been addressed or fixed. What gives?

    Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    We fixed that issue a few releases ago. You’re also able to change the size of the thumbnails, as well as the number of posts displayed, thanks to the jetpack_top_posts_widget_image_options filter.

    We’re also working on adding a new option to filter our certain Post Types from the widget in this GitHub issue:
    https://github.com/Automattic/jetpack/pull/54

    Jeremy,

    I only see the filter to change the image size http://jetpack.me/tag/widgets/, but I don’t see the filter to change the amount of post. Am I missing something?

    Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    My bad. I took another look at the code, and it seems we’ve limited the number of posts to 10, for performance reasons.
    If you’d like to change that value you will need to edit the plugin files.

    Any chance you guys can make a filter for that like you did with the image size? That’d would be so awesome!

    Plugin Author Jeremy Herve

    (@jeherve)


    Jetpack Mechanic


    I created a GitHub issue here, and we’ll consider adding the filter in a future version of Jetpack.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘"Top posts" sidebar widget limit bug’ is closed to new replies.