Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using the theme Twenty Thirteen and am using wp_nav_menu() to display menu items. I need to remove the container <div> and <ul> from wp_nav_menu(). I tried this:

 wp_nav_menu( array( 'container' => '', 'items_wrap' => '%3$s', 'theme_location' => 'primary' ) ); 

Output recieved:

<div class="menu">
    <li class="page_item page-item-4"><a href="#">home</a></li>
    <li class="page_item page-item-7"><a href="#">aboutus</a></li>
    <li class="page_item page-item-11"><a href="#">services</a></li>
    <li class="page_item page-item-13"><a href="#">contactus</a></li>
    <li class="page_item page-item-15"><a href="#">testimonials</a></li>

But it's not working. How can I fix this?

share|improve this question
Define "not working". Is output not affected at all by customizing these parameters? – Rarst Sep 17 '13 at 12:36
yes. The container and ul are still displaying. – lifeline Sep 17 '13 at 13:05
Double check for "dumb" things? If you are editing right template, if you have any possible caching disabled, etc. – Rarst Sep 17 '13 at 13:07
Tested, and there is no ul. Something else is going wrong. – s_ha_dum Sep 17 '13 at 14:50
There is not nearly enough information to answer this question. What is the output rendered by the above code? Is a nav menu assigned to the indicated theme_location, or is the fallback being output? Regarding "not working": what is not happening that you expect to happen, or what is happening unexpectedly? – Chip Bennett Sep 17 '13 at 15:54

Your Answer


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

Browse other questions tagged or ask your own question.