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 am using the following code to register a menu for my theme. In functions.php I have written the following:

register_nav_menu( 'header-menu', __( 'Header Menu' ) );

When going into wp-admin >appearance > menus, the menu is not showing up.

Can anyone telll me what I am doing wrong?

share|improve this question
    
Where have you added that code in functions.php? Inside a callback hooked into an appropriate action, or just directly in the file? Also, what do you mean by "the menu does not show up"? What do you see? Have you created any custom nav menus yet? –  Chip Bennett Oct 25 '13 at 15:43
    
@ChipBennett I have added it on its own, not inside a callback. However, I have also tried to put it inside a callback as well: function register_menu() { register_nav_menu('header-menu', __('Header Menu')); } add_action('init', 'register_menu'); –  Eoghan OLoughlin Oct 25 '13 at 16:19
    
The correct action to hook into is after_setup_theme. But I think this is an Admin UI issue. Have you created any custom nav menus yet? –  Chip Bennett Oct 25 '13 at 16:55
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.