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);
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.