Hi @jcoonrod
Try to update your settings in Settings > Reading by choosing 4 in Blog pages show at most: https://ww.wp.xz.cn/documentation/article/settings-reading-screen/#reading-settings
Already did that – it makes no difference. Found one more piece of information – it seems to have happened when we pinned one of the posts. So I think this is actually a bug. Somehow the core is not counting the pinned post.
-
This reply was modified 2 years, 4 months ago by
jcoonrod.
What exactly are the query parameters? The posts don’t seem to be in chronological order, or alphabetical, or anything like that. Could you share a screenshot please?
Oh, it’s probably because you’ve a featured (sticky) post.
Thanks luk4 but I want the sticky post included, and I want the page to only show 4 posts total. That should be the correct behavior of the query loop, and it is how it displays while in editor but not out of editor. Not counting the pinned post, it is properly showing in newest first order.
Unfortunately, I’m afraid this is an identified bug that doesn’t yet have a fix or solution. You can track the following tickets that mention the bug you’ve encountered:
In the meantime and as a workaround, maybe you can build a “featured” section with only sticky post(s) on top of the section with “last” blog posts (through 2 different query loop blocks).
Edit: Of course, if you know that there will always be one and only one sticky post, you’ll get the same result by setting the number of items per page in the query loop to 3 instead of 4. 1 sticky post + 3 normal posts = 4. If, for whatever reason, there are no sticky post in the future, it’s probably better, in terms of user interface, to temporarily have only 3 posts in the section rather than 5 permanently.
-
This reply was modified 2 years, 4 months ago by
luk4.
-
This reply was modified 2 years, 4 months ago by
luk4.