Support

Account

Home Forums Front-end Issues acf/fields/post_object/query filter not working on the frontend? Reply To: acf/fields/post_object/query filter not working on the frontend?

  • Yep, tried it with the field’s key (the actual key, not just the name) and adding the priority parameters to the end. Still nothing…

    For reference, here’s my current code, where key is the key of the post object field I’m using:

    function sort_people( $args ) {
        $args['orderby'] = 'menu_order';
        $args['order'] = 'ASC';
        return $args;
    }
    
    add_filter('acf/fields/post_object/query/key=field_5a9f6ea45bfa1', 'sort_people', 10, 3);