WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying a lot of things so far and investigated core inside out, but couldn't find a way that allows me to add the submenu item, but doesn't add the meta box for a custom taxonomy.

The Menu item

// From: ~/wp-admin/menu.php
// That is the file that builds the menu and submenu entries.
// This is the part, where it adds the submenu items for taxonomies.
// This gets repeated for every (custom) post type menu entry.
$i = 15;
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
    if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )

    $submenu['edit.php'][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name );

The Meta Box

// From: ~/wp-admin/edit-form-advanced.php
// That is the file, that shows the content of a post type "edit" screen
// all taxonomies. Here it adds some meta boxes for taxonomies
foreach ( get_object_taxonomies($post_type) as $tax_name ) {
    $taxonomy = get_taxonomy($tax_name);
    if ( ! $taxonomy->show_ui )

    $label = $taxonomy->labels->name;

    if ( !is_taxonomy_hierarchical($tax_name) )
        add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name ));
        add_meta_box($tax_name . 'div', $label, 'post_categories_meta_box', null, 'side', 'core', array( 'taxonomy' => $tax_name ));

The public argument seems to only affect the query. The only factor, that I can see being responsible for both, adding the menu entry, as well as the meta box, is the show_ui argument.

Please proof me wrong. Thanks.

share|improve this question
I think your stuck with using remove_meta_box, the admin menu is a wild beast. Maybe a trac ticket is in order to add something like show_meta => array(bunch of posts) – Wyck Aug 10 '12 at 3:54
@Wyck I'm not completely sure what will happen with happen with the menu with 3.5 as scribu is still working on a trac ticket "for a better structure of admin $menu". I guess it will be something like get_current_screen();. Maybe you want to make a starting point with an answer and get a trac ticket at the end? – kaiser Aug 10 '12 at 13:33
up vote 0 down vote accepted

As per le comment.

function remove_artist_meta() {
    remove_meta_box( '{taxonomy name}', 'post', 'side' );

add_action( 'admin_menu' , 'remove_artist_meta' );

The Admin menu has been always difficult to deal with, some help here would be nice: http://core.trac.wordpress.org/ticket/12718

But I think that this could be added a a parameter to register_taxonomy. http://core.trac.wordpress.org/ticket/21543

share|improve this answer

Your Answer


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.