Skip to content
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

[Query Pagination] Move all instances to a pattern #1

Open
justintadlock opened this issue Feb 9, 2024 · 3 comments
Open

[Query Pagination] Move all instances to a pattern #1

justintadlock opened this issue Feb 9, 2024 · 3 comments
Assignees
Labels
🧪 Enhancement Spinning up new features in the lab. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?

Comments

@justintadlock
Copy link
Contributor

The goal is to move any instance of the Query Pagination block to a pattern. This allows us to manage the pagination output from a single file. This is a very good thing for long-term maintenance (fewer potential bugs and no inconsistencies across usages). It would also make it more easily swappable with alternate pagination patterns on the templating side (swapping shouldn't be an issue in the editor).

Currently, pagination patterns are broken in WordPress. With the following fix, they can be included, but they do not use the correct /page/* links on inherited queries:

Related issues:

@justintadlock justintadlock added the 🧪 Enhancement Spinning up new features in the lab. label Feb 9, 2024
@justintadlock justintadlock self-assigned this Feb 9, 2024
@justintadlock justintadlock added the WordPress Issue Whatcha doin' to me WordPress/Gutenberg? label Feb 9, 2024
@carolinan
Copy link

This seems to have been fixed "somewhere in Gutenberg 18.x" if you don't mind testing it again.

@justintadlock
Copy link
Contributor Author

@carolinan - This is still giving me the ?query-page=2 URLs on Gutenberg 18.3.

@codersantosh
Copy link

I'm still facing the same issue with the current Gutenberg version (19.3.0).

<!-- wp:pattern {"slug":"theme-slug/pagination"} /-->

Since many core/query block patterns are using the same pagination design, I’m temporarily resolving the issue in PHP by requiring pagination.php:

require 'pagination.php';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 Enhancement Spinning up new features in the lab. WordPress Issue Whatcha doin' to me WordPress/Gutenberg?
Projects
None yet
Development

No branches or pull requests

3 participants