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!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.