• I want to add a subnavigation into an existing main menu.
    The code for the main menu is
    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'depth' => 2, 'container_class' => 'menu', 'menu_class' => 'main', 'fallback_cb' => false ) ); ?>
    and it creates an ul-li-List.

    Now I need the sub nav (also an ul-li-list) INSIDE this LI.
    I thought “depth 2” in wp_nav_menu would create that automatically, but it doesn’t.. I found wp_list_pages…it creates a sub-ul-li-list…but I need this list INSIDE the LI of the main nav.
    It’s a free theme, I cannot find any further code that creates HTML-Code there for the main menu so I don’t know how to touch the LI

  • The topic ‘Putting sub navigation in wp_nav_menu’ is closed to new replies.