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.

Is there a way (with code) to automatically show the 'taxonomy' meta box in Appearance > Menus ?

This way, the users don't have to click on the 'Screen Options' tab > 'Show on screen' > 'taxonomy' checkbox

share|improve this question
    
I would have to check to be sure but I believe their is an array that holds that information. You can manipulate that array but I am not sure how you would do it without overriding user ability to hide that box. –  s_ha_dum Jan 5 '13 at 15:32
2  
This looks like a duplicate of this question (answered: yes, you can!) wordpress.stackexchange.com/q/15376/13810 –  guiniveretoo Jan 6 '13 at 1:13
add comment

1 Answer 1

Thanks @guiniveretoo, perfect :)

Finally this is how I did (this code is used for the menu page screen options):


/* Just use to find your screen_id */
add_filter('current_screen', 'the_current_screen' );
function the_current_screen($screen) {
    if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) return $screen;
    print_r($screen);
    return $screen;
}

/* Just use to display the options id */ add_filter('current_screen', 'the_screen_options' ); function the_screen_options() { global $wp_meta_boxes; $hidden = get_hidden_meta_boxes( 'nav-menus' ); var_dump( $hidden ); }

/* Show the all options by default in the menu page */ add_action('admin_init', 'set_user_metaboxes'); function set_user_metaboxes( $user_id = NULL ) { // These are the metakeys we will need to update in the menu page $meta_key['hidden'] = 'metaboxhidden_nav-menus';

// So this can be used without hooking into user_register
if ( !$user_id )
    $user_id = get_current_user_id(); 

// Set the default hiddens if it has not been set yet
if ( get_user_meta( $user_id, $meta_key['hidden'], true) ) {
    $meta_value = array('');
    update_user_meta( $user_id, $meta_key['hidden'], $meta_value );
}

}

share|improve this answer
add comment

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.