Reputation: 3074
I am creating a wordpress menu as follows:
<?php wp_nav_menu(
array(
'theme_location' =>'main_nav',
'walker' => new Walker_Nav_Primary()
)
); ?>
It generates the menu with exact structured way as I expect. i.e:
<ul id="menu-primary" class="menu">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-target="#">Mega</a>
<ul class="dropdown-menu">
<li><a href="https://www.facebook.com/">sub 1</a></li>
<li><a href="https://www.facebook.com/">sub2</a></li>
</ul>
</li>
</ul>
But hover effect is stop working. When I replace wp_nav_menu() with the generated html it works again. I checked all the jquery code is set at footer.php and my menu is located at header.php and get_header() is called before get_footer(). So everything should be okay if static html is okay. Strange! which wrong is going on behind the scene.
Upvotes: 0
Views: 31
Reputation: 151
I think, your menu has some issues with closing HTML tag. Better way to debug HTML issue is:
Hope that would help you to solve the issue. Thanks
Upvotes: 1