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

    Hi, I would like to hide the ENFOLD default WPML language switcher that displays two flags (in my case, as I have two languages) in the top bar (the Enfold Secondary Menu) and control it instead through WPML built in “Menu language switcher” option.

    I want to add the language switcher that I created in the WPML
    into the the Enfold Secondary Menu, but I need to hide the default switcher, because at the moment it shows both the “ENFOLD default WPML
    language switcher” AND the language switcher I created in WPML.

    I found this solution in the forum: https://kriesi.at/support/topic/wpml-language-switcher-replacement/

    #top #header #header_main .av-language-switch-item {
        display: none;
    }

    but it did not work for me.

    On my website you can see a “double” set of language switchers in the top bar (link is attached)

    thank you!

    #1210803

    I managed to extract the solution by tweaking the answers from one of the existing topics: https://kriesi.at/support/topic/dropdown-menu-wmpl-does-not-work-only-shows-vertically/

    In my case I just wanted the default ENFOLD language switcher to disappear totally, so that the switcher I created in the W P M L can be there instead (nit both of them). The solution is to put this code in the Enfold: functions.php :

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

    My problem is solved, but I am leaving this in case someone else would need it.
    Thank you.

    #1211280

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

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