Support

Account

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