• Resolved datdesignguy

    (@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:

    http://pastebin.com/YQnwV3VF

    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.

    Thread Starter datdesignguy

    (@datdesignguy)

    No dice 🙁 Still doesn’t have any effect.

    Did you see the ‘Removing the Navigation Container’ section on http://codex.wordpress.org/Function_Reference/wp_nav_menu

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

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

    Thread Starter datdesignguy

    (@datdesignguy)

    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!

    *facepalm*

    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.