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