How do you remove a Category-style (hierarchical) taxonomy metabox?

I was wondering if someone can help me with this. I’m currently following Shibashake’s tutorial about creating custom meta-boxes that include taxonomy selection here: http://shibashake.com/wordpress-theme/wordpress-custom-taxonomy-input-panels .
They show how to remove the standard metabox WordPress automatically creates for taxonomies using the remove_meta_box function. Only problem is that the function for some reason doesn’t seem to work on taxonomies that work as categories ie ones where the hierarchical option is set to true. I know I have the function working because the ones set up as tags disappear easily enough. I can’t if it just isn’t possible or if there is something special I need to add in one of the parameters to make it work.

Example:

Read More
$args = array( 
    'hierarchical' => false,  
    'label' =>'People',  
    'query_var' => true,  
    'rewrite' => true       
);
register_taxonomy('people', 'post',$args);

remove_meta_box('tagsdiv-people','post','side');

That works fine. If I set hierarchical to ‘true, however, the meta box stays put.

Can anyone shed some light?

Related posts

Leave a Reply

1 comment

  1. Non-hierarchical taxonomies (like tags) use tagsdiv-{$tax_name}. Hierarchical taxonomies (like categories) use {$tax_name}div.

    This is for historical reasons: categories were placed in categorydiv, tags in tagsdiv. When support for multiple non-hierarchical taxonomies was added, the tagsdiv name was expanded to tagsdiv-{$tax_name}. When finally multiple hierarchical taxonomies were made possible, they choose to generalize categorydiv to {$tax_name}div.