Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

<?php 
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' );
?>
share|improve this answer
    
That's exactly what I wanted, thanks @amit :-) –  Ben Everard Aug 2 '12 at 9:34
    
glad, I could help. –  amit Aug 2 '12 at 9:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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