Forums
Forums / Themes and Templates / Problem with menu
(@meisam)
13 years, 7 months ago
I’m trying to generate a menu in my template using the following code:
<?php wp_nav_menu(array( 'theme_location' => 'main-menu', 'container' => 'nav', 'container_id' => 'menu', 'menu_class' => 'navigation', 'menu_id' => 'nav' )); ?>
What I should be ending up with is this:
<nav id="menu"> <ul class="navigation" id="nav"> <li><a href="http://localhost/sample-page/">Sample Page</a></li> </ul> </nav>
Instead I get this:
<div class="navigation"> <ul> <li class="page_item page-item-2"><a href="http://localhost/sample-page/">Sample Page</a></li> </ul> </div>
Am I doing something wrong?
Please ignore this message I didn’t know that the default generated menu does not follow the arguments passed.
The topic ‘Problem with menu’ is closed to new replies.