• Resolved shaunbowen

    (@shaunbowen)


    Hi there, I am trying to use the Blog Grid widget to display 2 sticky posts and 1 other random post, but the behaviour is a bit erratic.

    In the Posts Query section I set ‘Posts per page’ to 3, ‘Order by’ to ‘Random Order’ and ‘Sticky Posts’ to ‘Default’. I assumed this would always show just 3 posts, but give priority to any sticky posts.

    However, it actually shows the 2 sticky posts AND 3 random posts, making a total of 5 posts.

    Have I misunderstood the behaviour of these options?

Viewing 1 replies (of 1 total)
  • Plugin Support Andrew Misplon

    (@misplon)

    Hi Shaun

    Thanks for your query.

    As far as I’m aware, in the Blog widget, Sticky Posts: Default does not mean “prefer sticky posts within the 3-post limit”. It means “leave WordPress’ normal sticky-post behavior in place”.

    With that default behavior, WordPress can move sticky posts to the front and also pull in sticky posts that were not part of the original limited result set. So with Posts per page = 3, Order by = Random, and 2 sticky posts on the site, it’s possible to end up with 2 sticky + 3 random = 5 posts displayed.

    So in this case, Posts per page is not a hard cap when sticky posts are left on Default.

    If you need exactly 3 posts total, there isn’t currently a built-in option for “show sticky posts first, then fill the remaining slots with random non-sticky posts”. The current options are:

    • Default: use WordPress’ native sticky behavior
    • Ignore sticky: treat sticky posts like normal posts
    • Exclude sticky: never show sticky posts
    • Only sticky: show sticky posts only
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.