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 having trouble trying to get my new theme working. I have all 4 menus working on my test server but when I move the theme to the live server and set up all but one (main-menu) will not show up.

Here is my code for the menus:

register_nav_menus( array(
'main-menu' => __( 'Main Menu', 'Bootstrap WP Primary' ),
'second-menu' => __( 'Second Menu' ),
'footer-menu' => __( 'Footer Menu' ),
'mobile-menu' => __( 'Mobile Menu', 'Mobile Menu' )
));

Here is the code from the current template:

register_nav_menus(
array(
  'main-nav' => __( 'Main Nav' ),
 ));

Is it a conflict with the main menu items?

white Menu is Second Menu, Purple is Main white Menu is Second Menu, Purple is Main and isn't showing up on live site

Also upon inspection of the code the menu isn't even being populated on to the page.

share|improve this question
    
Is the "Main Menu" the only menu item not showing up? I am not clear on which menus are now not appearing on your live server? –  Rachel Baker Jan 28 at 16:52
    
Yes the main menu is the only one not showing. On the original theme I didn't have have all the additional menus. –  Chad J Treadway Jan 28 at 18:00
add comment

1 Answer 1

up vote 0 down vote accepted

To display a menu you need to use the wp_nav_menu function (Codex reference).

Try changing your template file to use the following code:

<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
share|improve this answer
    
I tired that yesterday and it didn't work, oh well! Posting right! –  Chad J Treadway Jan 28 at 19:45
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.