How to print wordPress nav menu

wp nav menu0

Print WordPress menu by Targeting a specific menu name

wp_nav_menu( array(
    'menu' => 'Project nav'
));

Print WordPress menu by theme location.

If you are using theme location you must be registered with register_nav_menu() in your function.php file.

wp_nav_menu( array( 
  'theme_location' => 'primary'
)); 

Checkout for more info about wp_nav_menu().

Leave a Reply