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.

I'm having a little issue which looks like a bug but probably isn't. Here we go:

I simply have this:

<?php wp_nav_menu( array('theme_location' => 'primary', 'container' => false, 'menu_class' => 'nav')); ?>

Now, my issue is that I expect my output to be:

<ul class="nav">
    <li>My link</li>
</ul>

instead I'm getting:

<div class="nav">
    <ul>
       <li>My Link</li>
    </ul>
</div>

I can't assign my nav class to the ul. How do I do that?

Many thanks!

share|improve this question
    
Have you seen this answer? –  toscho May 11 '13 at 21:16
    
mmh, ok, I'm gonna have a look - but in the docs it says : $menu_class (string) (optional) The class that is applied to the ul element which encloses the menu items. Multiple classes can be separated with spaces. Formerly known as $wrap_class. Default: menu –  Akmur May 11 '13 at 21:21
    
There is also an argument 'container' that should be set to an empty string (example). You need it to change the … container. :) –  toscho May 11 '13 at 21:24
    
which is this one i believe 'container' => false ... no? –  Akmur May 11 '13 at 21:28
2  
do you have a menu created and assigned to this location? –  Milo May 11 '13 at 22:05

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.