WPML activated priamry menu not working


Author Message
Eric

Posted: 7/2/2015
Quote message 

When I activate WPML alle pages are visible in the menu. Without WPML it uses the primary menu as it should do. What to do??


Can I force a menu source in sidebar-header.php?

<?php if (theme_get_option('theme_use_default_menu')) { wp_nav_menu( array('theme_location' => 'primary-menu') );} else { ?><nav class="mobile-nav">
<?php
echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'mobile-hmenu'
)
);
get_sidebar('nav');
?>
</nav><?php } ?>
 
Alejandro

Posted: 7/27/2015
Quote message 

I'm having the same problem, I've tried to force the menu source to "Custom menu" but it shows nothing, I've also tried to force the call to wp_nav_menu by adding to the if statement the condition "or true" and it shows my custom menu but with no style.

Any help would be appreciated.

Thanks to everyone.
 
Roland

Posted: 9/23/2015
Quote message 

Hi, it´s still the same problem. The primary menu doesn't work, when wpml is activated.
Is there a solution?
 
jan

Posted: 10/31/2015
Quote message 

Same probleem....
is there een solution?
 
Davide

Posted: 11/28/2015
Quote message 

Hi,
i had the same problem today and i solved with substituting this code :

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'art-hmenu'
)
);

with this code :

wp_nav_menu( array( 'menu' => 'XXXXXX', 'theme_location' => 'primary', 'menu_class' => 'art-hmenu', 'menu_id' => 'menu-primary-navigation' ) );

Obviously you had to subistitute XXXXXX with your menu name..
Works perfectly
 
timili

Posted: 2/24/2016
Quote message 

Hi, I have a similary problem. could you tell me in which part of the theme i have to put the code?

Thank you :-)
 
Zoltan

Posted: 6/20/2016
Quote message 

Same quastion here. Where to put the code? Thank you...
 
Johnny Krüger

Posted: 8/21/2016
Quote message 

the code can alternatively be found in the hgeader.php of the active theme.. I hope that helps. It worked for me. :-)
 
Johnny Krüger

Posted: 8/21/2016
Quote message 

sorra.. should be header.php
 
paolo

Posted: 10/17/2018
Quote message 

Quote Davide:

Hi,
i had the same problem today and i solved with substituting this code :

echo theme_get_menu(array(
'source' => theme_get_option('theme_menu_source'),
'depth' => theme_get_option('theme_menu_depth'),
'menu' => 'primary-menu',
'class' => 'art-hmenu'
)
);

with this code :

wp_nav_menu( array( 'menu' => 'XXXXXX', 'theme_location' => 'primary', 'menu_class' => 'art-hmenu', 'menu_id' => 'menu-primary-navigation' ) );

Obviously you had to subistitute XXXXXX with your menu name..
Works perfectly


Hi Davide, I am working on a website using an Artisteer theme and I was struggling with the menus ... well, THANK YOU for your solution, you saved the day!!!

Paolo