Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #310453

    Hi guys again!

    Can you help me to display the language switcher of WPML in Enfold?

    In default mode, the switcher with flags will be displayed here in the secondary menu. I think that’s not good.

    What I’ve done: I could turn off the flag switcher in the secondary menu. Then I inserted the built-in switcher WPML in the secondary menu (text only). Then the flag switcher displayed as default in the main menu. I do not want too. However, I have not made it. Now everything is default again.

    How it should be: no display of flags (not in the secondary and also not in the main menu). Only the switcher (as text) to be displayed in the secondary menu.

    Is this possible? How can I customize?

    Thank you in advance for your help.

    Best regards. Ulrich

    • This topic was modified 9 years, 7 months ago by Dude.
    #310549

    Hey adwordsfriends!

    1) You can use this code to remove the default theme flags completely – insert it into the 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);
    }
    

    The WPML plugin should add the language dropdown to the menu if you tick the “Display the language switcher in the WP Menu” option and select the main menu (or secondary menu) in the dropdown: http://www.clipular.com/c/5697699709976576.png?k=tR7hiYan-r1Pht6Rl__rwYgcx8k

    Regards,
    Peter

    #310633

    Cool! Thanks, Peter.

    It works fine. Excellent work.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Display language switcher in WPML and Enfold’ is closed to new replies.