Skip to content

Instantly share code, notes, and snippets.

@stephanieleary
Created June 21, 2012 13:44
Show Gist options
  • Save stephanieleary/2965797 to your computer and use it in GitHub Desktop.
Save stephanieleary/2965797 to your computer and use it in GitHub Desktop.
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