-
Notifications
You must be signed in to change notification settings - Fork 359
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
Quadrat: hide query pagination if there's no pagination #4272
Conversation
af0fb8d
to
ce96000
Compare
I believe this is ready for a review. To test, check out this PR and make sure pagination is appearing correctly. Then, adjust your site so that fewer than five posts exists. No pagination container or dividing line should be rendered. |
@@ -1,6 +1,6 @@ | |||
<!-- wp:template-part {"slug":"header"} /--> | |||
|
|||
<!-- wp:query {"tagName":"main","layout":{"inherit":true},"queryId":1,"query":{"perPage":5,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":true}} --> | |||
<!-- wp:query {"tagName":"main","layout":{"inherit":true},"queryId":1,"query":{"perPage":5,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":"","inherit":false}} --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to adjust inherit to false for pagination to work at all... This matches skatepark's index query too: https://github.com/Automattic/themes/blob/trunk/skatepark/block-templates/index.html#L6
Should we do this on search.html and query-diamond.php too? |
This looks fine to me locally but wpcom still doesn't have the GB change |
Oh yeah, I will update there too.
Ah I see, shall we hold off on merging until the fix is there? |
Yeah, we talked about holding this one until It lands since the bug is very minor |
We should do this for all themes: #4805 |
Changes proposed in this Pull Request:
This change relies on
WordPress/gutenberg#33635WordPress/gutenberg#35092To test, activate this PR on a completely empty site or one with less than five posts ( so no pagination appears ).
Related issue(s):
Solves #4268