WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 1 down vote accepted

Use the items_wrap argument (see codex).

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

Your Answer


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