• Resolved vanBersie

    (@vanbersie)


    In my header I use:

    wp_nav_menu( array(
     //'theme_location' => 'header-menu',
     'theme_location' => '',
     'menu' => 'id'
    ));

    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?

    https://www.ads-software.com/plugins/polylang/

Viewing 1 replies (of 1 total)
  • Thread Starter vanBersie

    (@vanbersie)

    Already fixed. I figured out that my theme had this line of code:

    register_nav_menus( array(
    	'primary' => __( 'Primary Navigation', 'theme_name' ),
    ) );

    So I just had to change the theme_location option to:
    'theme_location' => 'primary'
    and now it works! Sorry!

Viewing 1 replies (of 1 total)
  • The topic ‘wp nav menu items in wrong order – how to fix?’ is closed to new replies.