Support

Account

Home Forums Backend Issues (wp-admin) How do I hide unnecessary tags from taxonomy checkbox? Reply To: How do I hide unnecessary tags from taxonomy checkbox?

  • I just fixed it with acf/fields/taxonomy/wp_list_categories. I had to look up all the numerical value of the terms I want excluded, but it works

    function my_taxonomy_query( $args, $field) {
      
     $args['exclude'] = array(91,96,2,26,33,15,64,44,62,11,95,77,66,71,10,92,67);
    
        return $args;
        
    }
    
    add_filter('acf/fields/taxonomy/wp_list_categories', 'my_taxonomy_query', 10, 2);

    The acf/fields/taxonomy/query filter didn’t work for me at all for some reason, couldn’t even get the example code to work.