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'm creating custom wordpress theme. How can I enable "Description" metabox for menu items (on nav-menu page) by default programmatically?

share|improve this question
"WordPress already comes with the option to add a description to each menu item, but it is hidden by default." See: kriesi.at/archives/… – adrian7 Jan 6 '13 at 13:31
adrian7, how can I show this metabox by default? – Stanislau Ladutska Jan 6 '13 at 13:36
I will post an answer when I find out. – adrian7 Jan 6 '13 at 13:42
Thank you, adrian7! – Stanislau Ladutska Jan 6 '13 at 13:47
up vote 1 down vote accepted

Remove the description from the user meta value managenav-menuscolumnshidden:

add_filter( 'manage_nav-menus_columns', 'enable_nav_menu_description_by_default' );

function enable_nav_menu_description_by_default( $columns )
    $desc_key = 'managenav-menuscolumnshidden';
    $hidden   = get_user_option( $desc_key );
    $user_id  = wp_get_current_user()->ID;

    if ( ! $hidden )
            array ( 0 => 'link-target', 1 => 'css-classes', 2 => 'xfn' )
    elseif ( FALSE !== ( $key = array_search( 'description', $hidden ) ) )
        unset( $hidden[ $key ] );
        update_user_option( $user_id, $desc_key, $hidden );

    return $columns;
share|improve this answer
Thank you, toscho♦ ! – Stanislau Ladutska Jan 6 '13 at 14:51

If you're looking to output the menu description here is a useful tutorial using WordPress Walker Menu class to enchance the menu Wordpress Walker Menu Tutorial

share|improve this answer
Thank you nackle for your answer. But I need a little different thing. I need to enable metabox in admin panel, on nav-menus screen. – Stanislau Ladutska Jan 6 '13 at 13:23
@nackle your answer is not related to the question. – adrian7 Jan 6 '13 at 13:34
It may not be related the the original question, but a search on here for "nav description" brought this post as the first result. Which in turned answered the question that I came here with on how to display nav descriptions. Upvote for that. – AndyWarren Apr 6 '13 at 15:36

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.