-
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
Query block: Nicer URLs for paged query. #32531
Comments
👋 - what do you propose as nicer URL? Currently the
We need all the above info (page and query identifier) because this way multiple Query Loop blocks are supported in the same page, with their own pagination. |
The ugly link may be unavoidable for the scenario of secondary loops, but it would make sense to defer to the permalinks settings (e.g. |
It actually does that. If a
|
Adding a big plus-one for hiding the query string generated by this block. Users have been asking how to do it, and are confused by not having pretty permalinks there, when they work as expected everywhere else outside of this one block. A URL structure that matches how this is done in classic themes would be just fine. |
I wonder if this wouldn't need to be implemented via the permalink component on the backend |
Suggestion: we can add an option on the pagination block itself to change the permalink query var for the block. The components of the query var as pointed out by @ntsekouras are all needed, but only so that the query loop and page can be detected from the URL and so it can be pin-pointed which loop we're trying to query the next for. But if you can specify the query var for the pagination block, then you won't need any kind of detection since you'll be sure it's unique. |
Another GitHub-related issue might be a duplicate #48251 |
Another request in forums similar to this:
Forum issue: https://wordpress.org/support/topic/pagination-493/ |
When creating this block, it creates custom queries and replaces ALL links with These pages are not correctly registered with the WordPress Query and Rewrite APIs. Some plugins, like Yoast SEO, will blindly insert those links and bring down sites from Google. Background: https://wordpress.org/support/topic/query-pages-getting-indexed/#post-17211606. This breaks SEO and brings down sites when the block is used -- but perhaps even when it's not. I urge you to reconsider this block's foundations or even its existence. |
Using WP 6.7 rc4 and Query Type Sadge... I'm not using I'd wish pages would be paginated like |
@jeflopodev I couldn't reproduce that in 6.6 and additionally blocks like
Are you using some kind of Finally noting that for custom Query Loop blocks we never had urls like |
Hi @ntsekouras So I'm no longer having the issue I had (
I was using "Post name" permalink structure
I really dislike WP using query string params for custom query loops. IMHumbleO this should be handled internally and transparently for the end user, so the URLs could still be |
I noticed that URLs of a paged query results have a structure looking something like this:
https://mylocal.test/test-page/?query-7-page=2
. Would it be possible for the link to look nicer and be more easily readable?Steps to replicate:
The text was updated successfully, but these errors were encountered: