fbpx
33 C
Lahore

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

Must read

Ayyaz Zafarhttps://www.ayyaztech.com
I am Full Stack Web Developer with 10 years of professional Experience. I have following Skills: HTML5, CSS3, Javascript, jQuery, Ajax, PHP, MySQL, jQuery, Angular, React.js, Wordpress, Codeigniter, Laravel, Node.js, Mongo DB, Express.js, GraphQL, Typescript, Apollo and many more..
<?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="{3b3dd3986446f2411a115859dfb9ef0645ca07550196603d49955fcfabeac62d}1$s" class="{3b3dd3986446f2411a115859dfb9ef0645ca07550196603d49955fcfabeac62d}2$s nav navbar-nav right_navbar">{3b3dd3986446f2411a115859dfb9ef0645ca07550196603d49955fcfabeac62d}3$s</ul>',
	'depth'           => 0,
	'walker'          => ''
);

 wp_nav_menu( $defaults );

?>

 

- Advertisement -spot_img

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article