Home › Forums › Feature Requests › Relationship: Post Children Filter › Reply To: Relationship: Post Children Filter
Being on ACF Pro 5.3.2.2 it still doesn’t seem to work. When I add it to my functions.php, and I really took care of it being proper, I only get a spinning loading animation, but no pages are being shown which I could select. If I leave off the filter, the field then works well (but of course showing all instead of only pages of the current page). Or did I miss anything here?
Code is standard:
function childpages_query( $args, $field, $post )
{
$args['post_parent'] = $post->ID;
return $args;
}
add_filter('acf/fields/relationship/query/name=pages_childpages', 'childpages_query', 10, 3);
Thanks for any help in advance ;).
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
ACF’s Repeater field is a versatile solution for repeating content in #WordPress.
— Advanced Custom Fields (@wp_acf) December 29, 2022
What’s your favorite use case for the Repeater field?
What’s the weirdest thing you’ve ever used it for?
Let us know!👇
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.