WordPress custom menu displayng all pages

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() {
      '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

Leave a Reply

Your email address will not be published. Required fields are marked *