Fix/query default posts per page#77993
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks for the PR, @pranvinit! The referenced issue isn't a bug, at least not as the Query block currently works. Default queries will use |
What?
Closes #77886
Allows the Query Loop block’s default query type to override “Items per page”.
Why?
Default Query Loop blocks inherit the current template query, but users could not reduce the number of displayed posts for archive templates without custom code.
How?
Shows the “Items per page” control for inherited queries and applies
query.perPagewhen rendering inherited Query Loop results, pagination, totals, and no-results state.Testing Instructions
10.3.Testing Instructions for Keyboard
Screenshots or screencast
N/A
Use of AI Tools
AI tooling was used to help draft and implement the change. The code was reviewed before submission.