I'm new to WordPress and currently working with it. I'm having a trouble with my navigation menus. The supposed different set of menus on my header and footer are the same. What would be the problem?
Here is my code: for header.php
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset');?>">
<meta charset="viewport" content="width=device-width">
<title><?php bloginfo('name'); ?></title>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div class="container">
<!-- site-header -->
<header class="site-header">
<h1><a href="<?php echo home_url(); ?>"><?php bloginfo('name'); ?></a></h1>
<h5><?php bloginfo('description'); ?></h5>
<nav class="site-nav">
<?php
$args = array(
'theme-location' => 'primary'
);
?>
<?php wp_nav_menu( $args ); ?>
</nav>
</header><!-- /site-header -->
for footer.php
<footer class="site-footer">
<nav class="site-nav">
<?php
$args = array(
'theme-location' => 'footer'
);
?>
<?php wp_nav_menu( $args ); ?>
</nav>
<p><?php bloginfo('name'); ?> - © <?php echo date('Y'); ?></p>
</footer>
</div> <!-- container -->
<?php wp_footer(); ?>
</body>
</html>
for functions.php
<?php
function WordpressSample_resources() {
wp_enqueue_style('style', get_stylesheet_uri());
}
add_action('wp_enqueue_scripts','WordpressSample_resources');
//Navigation Menus
register_nav_menus(array(
'primary' => __( 'Primary Menu'),
'footer' => __( 'Footer Menu'),
));