Home › Forums › Bug Reports › add_filter('acf/fields/taxonomy/query') bug › Reply To: add_filter('acf/fields/taxonomy/query') bug
Hi,
I currently need to order select/radio by ID (because there’s unfortunately no custom order in WP).
This :
function my_taxonomy_list( $args, $field ) {
if( $field['name'] == 'acf[field_5478963c3fe12]' )
{
$args['orderby'] = 'count';
$args['order'] = 'DESC';
return $args;
}
else return $args;
}
add_filter('acf/fields/taxonomy/wp_list_categories', 'my_taxonomy_list', 10, 2);
used to work but not anymore (I don’t know since when).
acf/fields/taxonomy/wp_list_categories/name= doesn’t work at all (filter never hits).
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.