-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination block does not take into account offset posts in query loop #47252
Comments
Hi, |
I can still replicate this with: WP 6.3-RC2 |
I was creating my own issue. But I searched through the issues index and found this issue that is based on this same problem or a very similar one. So I'm just going to copy paste my issue here: Description: This way I have a total of 34 posts. The front page has 12. +12 in the page 1 of the blog index sums 24. +12 in the page 2 sums 34. The problem is that I'm seeing an extra third & empty page in the pagination that shouldn't be there. Step-by-step reproduction instructions
Video, because, why not: Environment info:
|
It seems that in WP_Query class there are problems with the offset and pagination. I'm not sure what would be the best path forward here for this, but we should see why this is happening in core and if we can change that there. |
I also would like to share some Feedback from a User / Noob theme developer 😅 perspective / UX:
|
@jeflopodev I'm not sure I got you last comment 100%.. The think I can mention though that the |
Sorry for the confusion, Nik, I see that in the first sentence I used Enabled / Disabled incorrectly 😅 I have reworded / better structured the whole post for clarity. |
Description
When you set a Query Loop block to have an offset, the Pagination block does not seem to recognize this, and instead behaves as if those posts were still part of the query loop. This can result in blank pages when clicking pagination links.
Step-by-step reproduction instructions
Result
Page 2 is blank
Expected
Pagination should only be present when there are posts to display in any of the paginated areas. There should be no blank pages. Pagination block needs to take into account offset posts.
User report
Reported in the WP.org support forums: https://wordpress.org/support/topic/front-page-74/
Screenshots, screen recording, code snippet
pagination-block-bug.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: