Hi Gunu, I have solved my problem, caused by theme Goodnews.Main menu of theme Goodnews not compatible with qTranslate, below Old code
<?php if (mom_option('sticky_navigation_logo', 'url') != '') {
echo '<a class="sticky_logo" href="'. esc_url(home_url()) .'"><img src="'.mom_option('sticky_navigation_logo', 'url').'" alt="'. get_bloginfo('name') .'"></a>';
} ?>
<?php if ( has_nav_menu( 'main' ) ) { ?>
<?php
$main_menu_query = get_transient( 'main_menu_query'.get_queried_object_id().$lang );
if (function_exists('is_buddypress')) {$main_menu_query = false;}
if( $main_menu_query === false ) {
$main_menu_query = wp_nav_menu ( array( 'menu_class' => 'main-menu mom_visibility_desktop','container'=> 'ul', 'theme_location' => 'main', 'walker' => new mom_custom_Walker(), 'echo' => false ));
set_transient( 'main_menu_query'.get_queried_object_id().$lang, $main_menu_query, 60*60*24 );
}
echo $main_menu_query;
?>
<?php } ?>
<?php if ( has_nav_menu( 'main' ) ) { ?>
<div class="device-menu-wrap mom_visibility_device">
<div id="menu-holder" class="device-menu-holder">
<i class="fa-icon-align-justify mh-icon"></i> <span class="the_menu_holder_area"><i class="dmh-icon"></i><?php _e('Menu', 'theme'); ?></span><i class="mh-caret"></i>
</div>
<?php
$main_mobile_menu_query = get_transient( 'main_mobile_menu_query'.get_queried_object_id().$lang );
if (function_exists('is_buddypress')) {$main_mobile_menu_query = false;}
if( $main_mobile_menu_query === false ) {
$main_mobile_menu_query = wp_nav_menu ( array( 'menu_class' => 'device-menu mom_visibility_device','container'=> 'ul', 'theme_location' => 'main', 'walker' => new mom_mobile_custom_walker(), 'echo' => false ));
set_transient( 'main_mobile_menu_query'.get_queried_object_id().$lang, $main_mobile_menu_query, 60*60*24 );
}
echo $main_mobile_menu_query;
?>
New code main menu
<nav id="navigation" itemtype="https://schema.org/SiteNavigationElement" itemscope="itemscope" role="navigation" class="<?php echo $dd_effect.$nav_sh; ?> ">
<div class="navigation-inner">
<div class="inner">
<?php wp_nav_menu ( array( 'menu_class' => 'main-menu mom_visibility_desktop','container'=> 'ul', 'theme_location' => 'main' )); ?>
<?php if ( has_nav_menu( 'main' ) ) { ?>
<div class="device-menu-wrap mom_visibility_device">
<div id="menu-holder" class="device-menu-holder">
<i class="fa-icon-align-justify mh-icon"></i> <span class="the_menu_holder_area"><i class="dmh-icon"></i><?php _e('Menu', 'theme'); ?></span><i class="mh-caret"></i>
</div>
<?php
$main_mobile_menu_query = get_transient( 'main_mobile_menu_query'.get_queried_object_id().$lang );
if (function_exists('is_buddypress')) {$main_mobile_menu_query = false;}
if( $main_mobile_menu_query === false ) {
$main_mobile_menu_query = wp_nav_menu ( array( 'menu_class' => 'device-menu mom_visibility_device','container'=> 'ul', 'theme_location' => 'main', 'walker' => new mom_mobile_custom_walker(), 'echo' => false ));
set_transient( 'main_mobile_menu_query'.get_queried_object_id().$lang, $main_mobile_menu_query, 60*60*24 );
}
echo $main_mobile_menu_query;
?>
</div>
<?php
if (file_exists(get_template_directory() . '/demo/demo.php')) {
global $mom_iconic_menu;
wp_nav_menu ( array( 'menu_class' => 'main-menu mom_visibility_desktop display_none iconic_menu','container'=> 'ul', 'menu' => $mom_iconic_menu, 'walker' => new mom_custom_Walker() ));
}
?>
<?php } ?>
</div>
</div> <!--nav inner-->
</nav> <!--Navigation-->