Posted on Leave a comment

WordPress: How to display navigation menu in your custom theme?

<?php

$defaults = array(
	'theme_location'  => 'primary',
	'menu'            => '',  // name of the menu you created in the menus
	'container'       => '',
	'container_class' => '',
	'container_id'    => '',
	'menu_class'      => '',
	'menu_id'         => '',
	'echo'            => true,
	'fallback_cb'     => 'wp_page_menu',
	'before'          => '',
	'after'           => '',
	'link_before'     => '',
	'link_after'      => '',
	'items_wrap'      => '<ul id="%1$s" class="%2$s nav navbar-nav right_navbar">%3$s</ul>',
	'depth'           => 0,
	'walker'          => ''
);

 wp_nav_menu( $defaults );

?>