Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
<?php 
wp_nav_menu( 
    array( 
        'theme_location' =>'main_menu',
        'container' => false,
        'menu_id'=> 'nav'
    )
); 
?>

After updating WordPress to 3.8 menu id is not working. Where is the problem ? I like to get menu as

<ul id="nav">
<li><a href="">Home</a></li>
<li><a href="">About</a></li>
</ul>
share|improve this question
    
What markup are you getting? There was no change to this argument in 3.8, it should still work. –  Rarst Jan 18 at 12:42
    
I ma not gating ul id as <ul id="nav">. I have a theme and I used 'menu_id'=> 'nav' to give ul id like <ul id="nav"> but it is not working after updating. I checked by using that function array to add class of menu ul it also not working. I can't understand where is the problem !! –  Hasanuzzaman Jan 18 at 12:48
    
<nav id="main_nav"> <ul id="menu-top-menu-1" class="menu DropDownMenu"> <!-- li items --> </ul> </nav> –  Hasanuzzaman Jan 18 at 14:04
add comment

2 Answers

up vote 0 down vote accepted

Try replacing 'menu_id'=> 'nav' by 'items_wrap' => '<ul id="nav">%3$s</ul>'

share|improve this answer
    
Thanks it is working . –  Hasanuzzaman Jan 18 at 14:07
add comment

The ID might have been omitted by WordPress if you have used it in some other place since no two exact same ID's can exist at the same time.

You should post your output to get more help on that. Is the menu showing but just without the ID or are you getting just <div></div> or what?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.