WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 using the _s theme and seeing the header menu point to 'Home' and 'Sample page'.

in functions.php, we have

register_nav_menus( array(
  'primary' => __( 'Primary Menu', 'mytheme' ),
  'secondary' => __( 'Secondary Menu', 'mytheme' ),
) );

Then in header.php, we use

<?php wp_nav_menu( array( 'theme_location' => 'Primary Menu' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'Secondary Menu' ) ); ?>


Finally, we have created both menus in the Wordpress custom menu section and added some custom items, but they are not reflected in the site. How do we match them up?

share|improve this question
up vote 4 down vote accepted

You should be calling the menus by name, not description:

<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
share|improve this answer

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.