2 differen’t menus and it’s using same items in both

I’m building a theme, in which, I have 2 menus:
1. Footer menu (footer-menu)
2. Main menu (main-menu)

However, when I called the main one in the header.php file it uses the same links added in the footer navigation.

Please see my code.

Registering the navs

register_nav_menus( array(
‘main-menu’ => esc_html__( ‘Main’, ‘wd’ ),
‘footer-menu’ => esc_html__( ‘Footer’, ‘wd’ ),
) );

header.php

<?php wp_nav_menu(‘main-menu’); ?>

footer.php

<?php wp_nav_menu(‘footer-menu’); ?>

What am I doing wrong? This has never occured before. Ever.

Read more here:: 2 differen’t menus and it’s using same items in both

Leave a Reply

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