Support » Fixing WordPress » wp_nav_menu cant get rid of container, wrong IDs

  • Resolved Darrell Schauss


    This was working before on WordPress, but now Im using multisite but I can’t seem to change the container or class/id values in the menu. The correct theme accepts all my other changes.

    wp_nav_menu( array('theme_location' => 'main_menu', 'sort_column' => 'menu_order', 'container'=>'', 'menu_class' => 'myclass', 'menu_id' => 'myid') );

    Even though 'container'=>'' it still prints a div and prints a div no matter what I put. The menu_class isn’t applied to the UL but the DIV that comes from nowhere. Also the menu_id isn’t applied.

    <div class="myclass"><ul><li class="page_item page-item-2"><a href="" title="About">About</a></li></ul></div>

    EDIT: Ok I forgot to create a custom menu and apply it to the registered menu location when rebuilding site as MU. I get this working now.

    <ul id="myid" class="myclass"><li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-22">.....
  • The topic ‘wp_nav_menu cant get rid of container, wrong IDs’ is closed to new replies.