Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #343059

    Hi there,

    I just installed WPML 3.1.8.2. on the following test site and saw the menu all messed up:

    http://casateulada.vacationrentalsecrets.com/casa-teulada-1/

    As you see, all flags appear next to each other, instead of in the drop down menu like in this other site I did (which is running the old versions of the plugin):

    http://www.casitasitges.com/de/

    I would like to have just the 1 flag on display and when you hover over it have the other languages displaying in a drop down menu, just like the example above, so it doesn’t mess up all the rest of the menu.

    You can watch the current ‘ok’ menu on the live main site:

    https://casateulada.com/casa-teulada-1/

    and the messed up one on the test site:

    http://casateulada.vacationrentalsecrets.com/casa-teulada-1/

    Thank you.

    Antonio

    #343759

    HI guys,

    Any update with the WPML switcher issue in the menu?

    I cannot unfortunately move on with making the site multilingual until I find out how to avoid having all the flags showing up side by side in the menu and messing up everything.

    Thank you for your time, I really appreciate.

    Antonio

    #344112

    Hi!

    1) Use this code (insert it at the bottom of the enfold or child theme functions.php file):

    
    add_action('after_setup_theme','avia_remove_main_menu_flags');
    function avia_remove_main_menu_flags(){
            remove_filter( 'wp_nav_menu_items', 'avia_append_lang_flags', 20, 2 );
            remove_filter( 'avf_fallback_menu_items', 'avia_append_lang_flags', 20, 2 );
            remove_action( 'avia_meta_header', 'avia_wpml_language_switch', 10);
    }
    

    to remove the default theme flags.

    2) To activate the WPML language switcher (= dropdown) go to WPML > Languages and tick the “Display the language switcher in the WP Menu” checkbox.

    Best regards,
    Peter

    #344329

    Thank you so much, Peter!

    It worked!

    Antonio

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Issue with WPML Language switcher not loading correctly on main menu’ is closed to new replies.