-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What problem does this address?
While setting up a Query-Loop block inside the footer to list posts from a CPT, the query is fetching post from all levels. I want to limit the query to just the top level.
If the posts would be children of a singular post I could use the parents field. But for top level post don't have a parent and there is no way to set the parents field to 0.
A custom WP_query in classic world can do this.
Also changing the query of the Query block via a php filter works.
What is your proposed solution?
Similar to my suggestion in #54461 it would be possible to give the parents field an option to set it to no-parent/top-level/0.
Alternatively and way more complicated:
Add an option to the filter panel to set the depth of the query to X levels deep.
This setting could be combined with the parents field. Fetching post at are children of "post-id" or grand-children X levels down.