Support » Themes and Templates » wp_nav_menu

  • I have added a custom menu to a site, using
    <?php wp_nav_menu( array('container_class' => 'teams_menu', 'menu' => 'Boys Teams') ); ?>

    The menu shows correctly, but is not wrapped in any ul or div, just a list of li’s.
    All the searching I’ve done has only found posts explaining how to remove the ul or wrapping div, but I need to find out why mine is not showing.

    Thanks

Viewing 1 replies (of 1 total)
  • Try to add this in your functions.php

    //Boys Teams Custom Menu
    if(function_exists('register_nav_menu')):
    	register_nav_menu( 'boys_teams', __( 'Boys Teams'));
    endif;

    Then do this for calling your custom menu. Place it in anywhere template file, usually in header.php or footer.php.

    Hopefuly it’ll help.

Viewing 1 replies (of 1 total)
  • The topic ‘wp_nav_menu’ is closed to new replies.