Support » Fixing WordPress » I can't remove the "nav" container using wp_nav_menu()

  • Looking at the documentation for wp_nav_menu I see that I should be able to remove the “nav” container by setting ‘container’ => false.

    Here is how I’m calling the menu:

    $output .= wp_nav_menu(array('theme_location'=>'account_info',
    				'container' => false,
    				'echo' => 0,
    				'menu_class' => 'account-info menu'
    			));

    here’s what $output has:

    <nav class="nav-header" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
       <ul id="menu-account-links" class="account-info menu genesis-nav-menu"><li id="menu-item-13656" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-13656"><a href="http://foo.com/my-account/">My Account</a></li>
       </ul>
    </nav>

    Is there a hook or filter that might be used to override my menu arguments? Or am I missing something in the way I’ve set up my arguments?

    Thanks for putting a second (or third or more) pair of eyes on this.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    What theme are you using? That doesn’t look like the regular markup for wp_nav_menu to me.

    The standard markup doesn’t contain the itemscope attributes.

    Thread Starter ancawonka

    (@ancawonka)

    Thanks Jose…. I’m using Genesis, so I can dig around in the code to see what’s happening there.

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Sounds like a plan.

    I’m not sure if you’ve taken a look at their forums:
    http://www.studiopress.com/forums/

    I know there are several other Genesis related tutorials out there that may be able to help as well. I, sadly, stopped bookmarking a lot of things.

    Thread Starter ancawonka

    (@ancawonka)

    So yes, it was a Genesis filter on the menu. Thanks for the help Jose!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I can't remove the "nav" container using wp_nav_menu()’ is closed to new replies.