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

any suggestions on how to get rid of ul tag wrapped around li tags in custom menu here at


the custom menu is outputted with nested tags around like

<ul id="menu-home" class="navLeft"><li><a href="http://www.blueoceanportfolios.com/careers/">Home</a></li>
<li><a href="http://www.blueoceanportfolios.com/careers/?page_id=18">About</a></li>

I am trying to take out the tags and already passed the container => false parameter before outputting custom menu as mentioned at wordpress codex, below is code again.

 $args = array(
   'menu' => 'home_menu',
   // 'sort_column' => '',
    'container' => 'false',
    'menu_class' => 'navLeft',
    'walker' => new my_walker()

wp_nav_menu( $args );
share|improve this question
up vote 1 down vote accepted

The container argument controls what is one level higher - around <ul>.

What you need is items_wrap argument that controls the list wrap and defaults to <ul id="%1$s" class="%2$s">%3$s</ul>.

Removing the ul wrap in Codex gives following example:

wp_nav_menu( array( 'items_wrap' => '%3$s' ) );
share|improve this answer
Hi @Rarst okay I went ahead and added the new argument 'items_wrap' => '%3$s' , still same ul tags wrapped around – eddywebs May 11 '11 at 21:25
@Adi I am not sure what the reason might be... Check that you are modifying correct lines of code, that it's uploaded to site ok and that page is not getting cached if you use some form of caching. – Rarst May 11 '11 at 21:33
Got it working now ! – eddywebs May 11 '11 at 22:50

Your Answer


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.