Created
June 21, 2012 13:44
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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