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?

1 Answer 1


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' ) ); ?>

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.