Problem in menu after hooking
-
Hi guys.
i’ve got a problem menu after hooking to wordpress.
I customized my menu by this code in header<header> <div class="container"> <div class="brand"> <a href="http://hesamstudio.com"><h2>Hesam<span>Studio</span></h2></a> </div> <div class="mobile-nav"> <a href="#" class="open-menu">MENU</a> </div> <nav class="navbar"> <ul class="menu"> <li class="menu-item"> <a href="https://www.hesamstudio.com">Home</a> </li> <li class="menu-item"> <a href="<?php echo get_template_directory_uri(); ?>/about.html">About</a> </li> <li class="menu-item"> <a href="#">Contact</a> </li> <li class="menu-item has-sub-menu"> <a href="#">Portfolio</a> <ul class="sub-menu"> <li class="menu-item"> <a href="<?php echo get_template_directory_uri(); ?>/illustration.html">Illustration</a> </li> <li class="menu-item"> <a href="<?php echo get_template_directory_uri(); ?>/bookillustration.html">Book Illustration</a> </li> <li class="menu-item"> <a href="#">Portrait Design</a> </li> <li class="menu-item"> <a href="#">Sketches</a> </li> </ul> </li> </ul> <a href="#" class="close-menu">Close Menu</a> </nav> </div> </header>after hooking by this code in function.php
<?php function theme_setup(){ add_theme_support('title-tag'); register_nav_menus(array( 'Main_Menu'=>'menu', )); } add_action("after_setup_theme","theme_setup"); ?>and changing header code to below my menu theme doesn’t work properly and in wordpress after adding sample menu it doesn’t show home and other menu which has been added.
<header> <div class="container"> <div class="brand"> <a href="http://hesamstudio.com"><h2>Hesam<span>Studio</span></h2></a> </div> <div class="mobile-nav"> <a href="#" class="open-menu">MENU</a> </div> <nav class="navbar"> <?php wp_nav_menu(array( 'theme_location' => 'Main_Menu', 'depth' => '3', )); ?> <a href="#" class="close-menu">Close Menu</a> </nav> </div> </header>- This topic was modified 4 years, 2 months ago by .
- This topic was modified 4 years, 2 months ago by .
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Problem in menu after hooking’ is closed to new replies.