Support

Account

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.