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 register 2 menus in my functions.php file:

    'main_menu' => 'Main Menu',
    'bottom_menu' => 'Bottom Menu'

I populate a menu in the admin and assign the theme location:

Assigning menu location

I call the menu in my theme:

    wp_nav_menu('menu', 'main_menu');

After doing all this, bottom_menu is the menu showing up in my theme instead.

Can anyone tell me what I'm doing wrong? Either I'm missing something really silly here or Wordpress is giving me the finger.

share|improve this question
wp_nav_menu() takes array of arguments, see usage examples in documentation. – Rarst Nov 22 '13 at 15:28
Resolved! It was the theme_location argument. – Eoghan OLoughlin Nov 22 '13 at 15:42

By specifying a theme_location argument in my array, the issue was fixed:

    'theme_location' => 'main_menu'


For a distributed Theme, do not pass the 'menu' parameter to the wp_nav_menu() call. It will look for a specific slug of a user-created menu, and will override 'theme_location'. Only ever pass 'theme_location'.

share|improve this answer
Ah ok I wasn't aware of that, thanks Chip. – Eoghan OLoughlin Nov 22 '13 at 17:17

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.