I am trying to create multiple menu in WordPress. Actually menu created and I assigned them location and saved but the problem when I call footer menu and save its just show footer menu links in both header and footer section here is my Code please help me out where I am wrong thanks. I am using WordPress 4.1
Code: Header.php
<nav class="site-nav">
<?php
$args = array(
'theme_location' => 'primary'
);
?>
<?php wp_nav_menu( 'args' );?>
</nav>
code: Footer.php
<nav class="site-nav">
<?php
$args = array(
'theme_location' => 'footer'
);
?>
<?php wp_nav_menu( 'args' );?>
</nav>
code: functions.php
function register_my_menu() {
register_nav_menus( array(
'header' => 'Header menu',
'footer' => 'Footer menu') );
}
add_action( 'init', 'register_my_menu' );
Here is image:
First Header Menu
Footer menu
Location
result
Where I am Wrong