Skip to content

Query Loop block: Allow creating loop to display child pages #54461

@webmandesign

Description

@webmandesign

What problem does this address?

In one of my pages - it is a parent page that has nested/child pages - I'm trying to add a Query Loop block displaying the list of child pages. I can not seem to do so.

Here is how to reproduce:

  1. Create a page and name it "Parent page".
  2. Create multiple other pages and name it "Child page #" and set "Parent page" as a page parent.
  3. Go back to editing "Parent page" and try to insert a Query Loop block displaying the list of child pages assigned to this page.

Here is what I try to set for the Query Loop block used in "Parent page":

  • Post type: "Page"
  • Order by: "A → Z" (would be actually nice to select "Custom order"/"Order attribute")
  • Filters: there is no option to set "Current page as parent" so I've tried to set the "Parents" option to the ID of the page, which doesn't work

The loop does not display the child pages, it simply displays a list of all pages of the website.

What is your proposed solution?

  1. Would be great to have an option to display pages that have current page as parent (applicable for any hierarchical post type). And possibly also setting to display direct children only.
  2. Would be great to have an option to order query results by "Order" attribute.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions