Here i am creating 2 menu sites “Main” and “Central”
if ( function_exists( 'register_nav_menus' ) ) {
register_nav_menus(
array(
'main' => 'Main',
'central' => 'Central'
)
);
}
when i am creating menus on wordpress aperience, menus
and i am puting them on their sites
PRS menu on Main
and central on Central
When i have incerted my menus on web
<?php wp_nav_menu( array('menu' => 'Main','menu_class' => 'menu' )); ?>
<?php wp_nav_menu( array('menu' => 'Central','menu_class' => 'menu' )); ?>
But on my web i am seyng “central” menu 2 times and PRS dont apear.
What is the problem and what solution cn i find?
Try single Register this way & then move on to array – add code below to functions.php:
WP Codex register_nav_menu
Display menu on page – add to header.php:
WP Codex wp_nav_menu
Tip – both of your entries have a ‘menu’ class:
Your code:
Change to: