I want to hide the tag and category boxes from the post editor, the theme I've just developed doesn't need them, thus I want to hide them.

I am aware they could be hidden using the 'screen options' menu, however I'd prefer to do this with a bit of code.

Is this possible?


Using remove metabox function you can do this. Simply put this inside your themes functions.php file at very end.

NOTE - unwrap <?php ?> if necessary.

function wpse60590_remove_metaboxes() {
    remove_meta_box( 'categorydiv' , 'post' , 'normal' ); 
    remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'normal' ); 

add_action( 'admin_menu' , 'wpse60590_remove_metaboxes' );
  • glad, I could help. – amit Aug 2 '12 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.