I have created two custom menus on my wordpress site.

Both menus setup in Appearance -> Menus. However both menus display the same set of pages which was all at the time of creation and cannot be changed despite creating two separate menus and assigning this to the locations set.

Declared in function.php

function register_my_menus() {
  register_nav_menus(
    array(
      'main-menu' => __( 'Main Menu' ),
      'extra-menu' => __( 'Store Menu' )
     )
   );
 }
 add_action( 'init', 'register_my_menus' );

Set theme location.

<?php wp_nav_menu( array( 'theme_location' => 'Main Menu', 'container_class' 'menu_class' ) ); ?>
<?php wp_nav_menu( array( 'theme_location' => 'Store Menu', 'container_class' => 'storeMenu_class' ) ); ?>

Read more here: WordPress custom menu displayng all pages


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: