I am using Taxonomy post_tags which is displayed with a checkbox on the backend.
I have 27 post_tags I want to hide from the checkbox because I know I will never use them again. This other user describes my problem perfectly. He came up with a solution but it looks like a very roundabout way of fixing the problem and I was wondering if there is a more elegant solution.
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.