I’m using a theme and added the polylang plugin to make the site multilingual. And it’s quite confusing to make the menu multilingual.
wp_nav_menu( array(
//'theme_location' => 'header-menu',
'theme_location' => '',
'menu' => 'id',
'orderby' => 'menu_order'
));
In my header I have this wp_nav_menu() function. When using this option 'theme_location' => ''
the order of the menu is correct but is not switching when clicking on the second language flag. Using this option: ‘theme_location' => 'header-menu'
changes menu when clicking on the flags but the menu items aren’t in the correct order. In the wp dashboard under appearence menus there are two menus and the polylang settings for these seems to be correct. Anyone knows what’s causing the problem and how to fix it?
Problem solved. I was using a theme which had this line of code in it’s functions.php:
So I had to use:
in the wp_nav_menu function.