Support » Fixing WordPress » wp_nav_menu() not removing container as instructed

  • Resolved datdesignguy


    Hi guys,

    I’m trying to set up superfish in a custom theme I am developing. To get this to work properly I need to remove the wrapping <div> from the wp_nav_menu function’s output.

    Here is my code:

    Any ideas here?

    I consulted the codex entry for wp_nav_menu() and I can’t find anything wrong with this code. No matter what I try though, it still outputs the menu with a <div> wrapper.

    Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try adding a space before the false on container.

    No dice 🙁 Still doesn’t have any effect.

    Did you see the ‘Removing the Navigation Container’ section on

    It states you can either set it up in functions.php or to try

    `<?php wp_nav_menu( array( ‘container’ => ” ) ); ?>

    I figured out what the “problem” was. Me. LOL.

    Guys, when you’re attempting to override the default arguments for wp_nav_menu… make sure you’ve assigned a menu to the theme location before you try and test out your code!


    Jarret, thanks for convincing me to take another long, hard look at the codex. If it weren’t for your suggestion, I probably would’ve sat stumped for another couple hours. No kidding. GAH! lol

    It happens, you can’t be a developer without little nuances like that 😉

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp_nav_menu() not removing container as instructed’ is closed to new replies.