This topic has 4 replies, 3 voices, and was last updated 8 years ago ago by Jack Richardson
Hi I just edit my menu but the front page is not changed.
Hello,
Please provide us with correct FTP and wp-admin panel credentials in Private Content.
Regards,
Eva Kemp.
I already purge cache and disable W3TC but still can not change menu. now the front and back menu are different.
Hello,
I’ve added this code in child functions.php file:
function et_get_main_menu($menu_id = 'main-menu') {
$custom_menu_slug = 'custom_nav';
$cache_slug = 'et_get_' . $menu_id;
if($menu_id == 'main-menu-right') $custom_menu_slug = 'custom_nav_right';
$custom_menu = etheme_get_custom_field( $custom_menu_slug );
$one_page_menu = '';
if(etheme_get_custom_field('one_page')) $one_page_menu = ' one-page-menu';
if(!empty($custom_menu) && $custom_menu != '') {
$output = false;
//$output = wp_cache_get( $custom_menu, $cache_slug );
if ( !$output ) {
ob_start();
wp_nav_menu(array(
'menu' => $custom_menu,
'before' => '',
'container_class' => 'menu-main-container'.$one_page_menu,
'after' => '',
'link_before' => '',
'link_after' => '',
'depth' => 4,
'fallback_cb' => false,
'walker' => new Et_Navigation
));
$output = ob_get_contents();
ob_end_clean();
wp_cache_add( $custom_menu, $output, $cache_slug );
}
echo $output;
return;
}
if ( has_nav_menu( $menu_id ) ) {
$output = false;
//$output = wp_cache_get( $menu_id, $cache_slug );
if ( !$output ) {
ob_start();
wp_nav_menu(array(
'theme_location' => $menu_id,
'before' => '',
'container_class' => 'menu-main-container',
'after' => '',
'link_before' => '',
'link_after' => '',
'depth' => 4,
'fallback_cb' => false,
'walker' => new Et_Navigation
));
$output = ob_get_contents();
ob_end_clean();
wp_cache_add( $menu_id, $output, $cache_slug );
}
echo $output;
} else {
?>
<br>
<h4 class="a-center">Set your main menu in <em>Appearance > Menus</em></h4>
<?php
}
}
Please clear cache and check menu now.
Best regards,
Jack Richardson.
You must be logged in to reply to this topic.Log in/Sign up