
How to Call Custom Menu in WordPress Put Below Code in function.php File
if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'main_menu' => __( 'Main Menu', 'cake' ), 'secondary_menu' => __( 'Secondary Menu', 'cake' ), ) ); }
After this save your Function.php file and Put Below code in Header.php file
'main_menu', 'menu' => '', 'container' => false, 'echo' => true, 'fallback_cb' => false, 'items_wrap' => '
- %3$s
‘, ‘depth’ => 0 ); wp_nav_menu( $defaults ); ?>
This Code Display Your Menu in Site.
About Author:
Kalpesh Chavada
Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.
