WordPress.org

Forums

Jetpack by WordPress.com
[resolved] "Top posts" sidebar widget limit bug (17 posts)

  1. azn137
    Member
    Posted 2 years ago #

    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/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    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.

  3. azn137
    Member
    Posted 2 years ago #

    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?

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    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/

  5. azn137
    Member
    Posted 2 years ago #

    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!

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 2 years ago #

    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.

  7. MechanixTRG
    Member
    Posted 2 years ago #

    I have the same problem, only 9...

    also i can change the size on thumbnails?

  8. azn137
    Member
    Posted 2 years ago #

    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.

  9. MechanixTRG
    Member
    Posted 2 years ago #

    Not working :(

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

    The thumbnails needs a regenerate?

  10. azn137
    Member
    Posted 2 years ago #

    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.

  11. azn137
    Member
    Posted 1 year ago #

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

  12. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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

  13. azn137
    Member
    Posted 1 year ago #

    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?

  14. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    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.

  15. azn137
    Member
    Posted 1 year ago #

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

  16. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

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

  17. azn137
    Member
    Posted 1 year ago #

    Thank you very much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic