Skip to content

Query block: is not respecting perPage attribute in inherited context #40996

@madhusudhand

Description

@madhusudhand

Description

In the query block, when inherit is set to true, query block always shows 10 posts and doesn't respect the perPage value.

Step-by-step reproduction instructions

The following query with inherit: false shows 3 posts.

<!-- wp:query {"queryId":18,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} -->

Same query with inherit: true shows 10 posts.

<!-- wp:query {"queryId":18,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true}} -->

Screenshots, screen recording, code snippet

No response

Environment info

  • Latest GB

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions