Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hide a custom taxonomy's input box while leaving the other admin UI alone
function remove_my_taxonomy_boxes()
$tax_name = 'my_taxonomy';
$content_type = 'post';
// presumably there is some condition you want to check, like current_user_can('something')
$remove = true;
if ($remove)
remove_meta_box( $tax_name.'div', $content_type, 'side' );
add_action( 'admin_menu', 'remove_my_taxonomy_boxes' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.