Home › Forums › Backend Issues (wp-admin) › Limit results in filter post_object query › Reply To: Limit results in filter post_object query
I just ran into this issue whereby filtering a post_object’s query wasn’t taking, but it looks like when a post_object’s type is ‘page’, ACF is effectively firing get_pages vs. creating a new WP_Query, so the args are all different.
So, running this choked:
$args['post_parent'] = $parent->ID;
$args['orderby'] = 'menu_order';
While running this works great:
$args['child_of'] = $parent->ID;
$args['sort_column'] = 'menu_order';
Hopefully this will help anyone else who’s wondering why this isn’t working properly.
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.