generateblocks
generateblocks copied to clipboard
[Query loop] Wrong number of posts is displayed when Posts per page don't have a value
I was under the impression that this issue was fixed.
Description
The wrong number of posts is displayed when Posts per page don't have a value.
Steps to reproduce
- Insert a query loop and don't enter a value in the
Posts per page
field. Values seem to default to10
. - View loop in the front end
Expected behavior
All posts should be displayed.
Actual behavior
10 posts are only displayed in the front end. The value of 10 is set and is not even related to the Settings -> readding -> Blog pages show at most
value in the blog settings.
@quantumleap33 if you would like to display all your posts you can use -1
More info here https://developer.wordpress.org/reference/classes/wp_query/#pagination-parameters
@JeanPaiva two issues:
- It's not obvious to users.
- It doesn't work on the backend edit screen.
We can resolve the issue by not allowing the this field to be left empty.
Closing. Add to #1133