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 did a class that extends Walker_Nav_Menu to modify the default classes of my < li >s but also to modify the default classes of my < ul >s. It seems that only the sub-menus are affected by the Walker. I would like to remove the classes and id of the first < ul > (the menu itself), but the walker won't let me do that.

There are some arguments in "wp_nav_menu( array $args )" that will let me change the < ul >'s class and id, but nothing to remove them. I don't want to do:

'menu_class' => '',
'menu_id' => '',

and i'm guessing there is a solution to completely remove the class and id.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Use the items_wrap argument (see codex).

wp_nav_menu(
    array(
        'items_wrap' => '<ul>%3$s</ul>',
    )
) 
share|improve this answer
    
AHHHH! Perfect! –  user25893 Jul 4 '13 at 15:18

Your Answer

 
discard

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