Field Connections: is there a way to get parent page info?

I want to be able to query child pages in the custom post module, but it doesn’t seem there is an option to. I can either manually specific the pages I want, or the pages I don’t and that’s it.

Given this limitation, I was hoping to use a [wpbb-if post: _____________]
styled filter since it’s better able to catch various scenarios… but I can’t seem to find a field connection to check what the parent page of a post is on:

Any suggestions?

Digging around I’ve found:

It definitely accomplishes what I want.
The question is: how do I filter based on child pages? It’s clear we pass info along further down for the filter to figure out if criteria is matched, but I’m not sure how it’s working in the backend.

My guesses so far have been to use:

post_parent__in
post_parent

as filtering criteria but neither have worked. I need this functionality as there are multiple pages with sub-content which ideally I can populate automatically as changes come in.

NVM. Got it working. My brain is slow today lol.

function fl_builder_loop_query_args_filter( $query_args ) {
  if ( 'industries-posts' == $query_args['settings']->id ) {
    $query_args['post_type'] = array( 'page');
    $query_args['post_parent'] = 15; /* child pages of industries */
  }

  return $query_args;
}
add_filter( 'fl_builder_loop_query_args', 'fl_builder_loop_query_args_filter' );

for anyone interested.

1 Like

Hi, sorry if this is a silly question… where do you place this code?

I want the same functionality - to be able to select the child pages of a specified parent page in the posts module.