0

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.

2
  • 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? Commented Jan 28, 2014 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. Commented Jan 28, 2014 at 18:00

1 Answer 1

0

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' ) ); ?>
1
  • I tired that yesterday and it didn't work, oh well! Posting right! Commented Jan 28, 2014 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.