Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Loop Block: Add support for post_parent (Only show child pages) #34033

Closed
tzugen opened this issue Aug 12, 2021 · 4 comments · Fixed by #40933
Closed

Query Loop Block: Add support for post_parent (Only show child pages) #34033

tzugen opened this issue Aug 12, 2021 · 4 comments · Fixed by #40933
Assignees
Labels
[Block] Query Loop Affects the Query Loop Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@tzugen
Copy link

tzugen commented Aug 12, 2021

What problem does this address?

I thing that I encounter frequently is the need to list or preview the child pages of the currently viewed parent page.
This is currently not really possible with the Query Loop Block.
I found a workaround (assigning the child pages a new author, in order to be able to filter them) but thats not really nice.

What is your proposed solution?

Variant A:
A checkbox "Show only subpages". If checked, the query loop block will show only pages where post_parent == ID

Variant B:
A selector "Only show subpages of" which allows to pick one or more parent pages, from which to list the subpages.

@carlomanf
Copy link

#31272 is closely related.

@bradhogan
Copy link

Hey all. Any updates on this feature? This is heavily utilized in themes we create for online course creators who only want to show top-level "courses" on their courses archive page (and not all of the lessons / child posts within the courses CPT). We can't really update our themes to a full site editing theme until this is put back in place in the query block (roughly 1k users of our theme). Thanks all! Loving the direction Gutenberg is heading.

@paaljoachim
Copy link
Contributor

Perhaps @ntsekouras Nik might have some feedback here.

@carlomanf
Copy link

carlomanf commented May 13, 2022

Variant A: A checkbox "Show only subpages". If checked, the query loop block will show only pages where post_parent == ID

Variant B: A selector "Only show subpages of" which allows to pick one or more parent pages, from which to list the subpages.

I see that #40933 is an implementation of variant B as described by the issue author. I welcome it, but I would also welcome Variant A as a separate implementation, as they serve slightly different purposes. #31272 and #39192 are a little bit more relevant for the purpose of variant A, if I am reading it correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants