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.

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

http://www.blueoceanportfolios.com/careers/

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>
</ul>

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',
    //'container_id'=>'myID',
    'menu_class' => 'navLeft',
    'walker' => new my_walker()
);


wp_nav_menu( $args );
share|improve this question
add comment

1 Answer 1

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
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.