Help with Navbar Dropdown
-
I am creating a custom theme and have menu support for the theme. I created a menu in under the ‘Appearance’ section and put some pages nested under an item on the navbar menu. I added the CSS to display the items on hover. But when I try to move my mouse to click on one of the items the dropdown goes away. Is there anything I have to do to make this work? Maybe a custom walker? Thanks for the help and if there is anything else you want to see please let me know. Here is some code:
From header.php:
<header class="site-header"> <nav class="container header-grid"> <div class="navigation-bar"> <div class="logo"> <a href="<?php echo home_url(); ?>" > <img class="img-logo" src="<?php echo get_template_directory_uri() . "/img/Rooted_LogoAsset-1.png"; ?>" alt=""/> </a> </div> <!--. logo--> <?php $args = array( 'theme_location' => 'main-menu', 'container' => 'nav', 'container_class' => 'main-menu', / 'menu' => 'main-menu', 'depth' => 0 ); wp_nav_menu($args); ?> </div><!--.navigation-bar--> </nav><!--.contianer--> </header>
In functions.php:
add_theme_support('menus'); //Wordpress Function register_nav_menus(array( 'main-menu' => "Main Menu", 'footer-menu' => "Footer Menu" ));
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Help with Navbar Dropdown’ is closed to new replies.