2026 Executive BenchmarkMid-Market Enterprise Modernization: How leaders across unify Commerce, Odoo ERP & AI in 90 days.
WORDPRESS

WordPress Post :

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',...

Akshar Group Technologies
Dec 25, 2020
1 min read
Verified Source

How to Call Custom Menu in WordPress Put Below Code in function.php File

javascript
<script>
if ( function_exists( 'register_nav_menus' ) ) {
register_nav_menus(
array(
'main_menu' => __( 'Main Menu', 'cake' ),
'secondary_menu' => __( 'Secondary Menu', 'cake' ),
));
}
</script>
After this save your Function.php file and Put Below code in Header.php file
php
<script>
'main_menu',
'menu' => '',
'container' => false,
'echo' => true,
'fallback_cb' => false,
'items_wrap' => '
%3$s
‘, ‘depth' => 0 ); wp_nav_menu( $defaults );
</script>
This Code Display Your Menu in Site.
Share this playbook
LET'S BUILD WHAT'S NEXT

What's Holding Your Business Back?

Tell us where you want to go, what's getting in the way, and we'll help you figure out the technology to get there.

No sales pitch. Confidential strategic advisory.