generateblocks icon indicating copy to clipboard operation
generateblocks copied to clipboard

[Query loop] Wrong number of posts is displayed when Posts per page don't have a value

Open quantumleap33 opened this issue 2 years ago • 2 comments

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

  1. Insert a query loop and don't enter a value in the Posts per page field. Values seem to default to 10.
  2. 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 avatar Sep 01 '22 11:09 quantumleap33

@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 avatar Sep 02 '22 05:09 JeanPaiva

@JeanPaiva two issues:

  1. It's not obvious to users.
  2. It doesn't work on the backend edit screen.

quantumleap33 avatar Sep 02 '22 17:09 quantumleap33

We can resolve the issue by not allowing the this field to be left empty.

diggeddy avatar Sep 27 '23 15:09 diggeddy

Closing. Add to #1133

diggeddy avatar Oct 19 '23 10:10 diggeddy