Hello everyone,
I am trying to create my own theme in Wordpress. I am trying to create in functions.php the navigation menu for my categories and they are 4 in total. Additionally I want to display a navigative link in the footer as well but it will have three different links. Any help will be huge. Thanks in advance
In my functions.php file I have:
<?php
function theme_setup(){
add_theme_support('custom-background');
add_theme_support('custom-header');
add_theme_support('post-thumbnails');
register_nav_menus(array('menu1'=>'Primary Menu','menu2'=>'Secondary Menu'));
}
add_action('after_setup_theme','theme_setup');
?>
In my header.php file I have:
<?php ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<?php wp_head(); ?>
</head>
<body>
<header>
<img src="<?php header_image(); ?>" alt="">
<h1><a href="<?php echo bloginfo('wpurl');?>"><?php echo bloginfo( 'name' ); ?></a></h1>
<?php wp_nav_menu(array('theme_location'=>'menu1'));?>
</header>
<main>
And in my footer.php file I have:
<?php ?>
</main>
<?php wp_footer(); ?>
<?php wp_nav_menu(array('theme_location'=>'menu1'));?>
</body>
</html>