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

    Hello,

    I’ve installed WPML and Enfold sets a default language switcher. I’d like to change that to a dropdown menu. I know that there are threads about this topic, the provided codes in these threads don’t do anything:
    https://kriesi.at/support/topic/wpml-language-switcher-8/#post-588831
    https://kriesi.at/support/topic/wpml-language-switcher-8/#post-695476

    Ismael provides a code here: https://kriesi.at/support/topic/language-switcher-3/

    If I add

    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);
    }
    add_action('ava_main_header', 'ava_icl_language_selector');
    function ava_icl_language_selector(){
    	do_action('icl_language_selector');
    }

    the language switcher by WPML is added, but the Enfold switcher remains also.
    Here is a screenshot: https://one-bound-beyond.org/screenshot/
    How can I remove the Enfold switchers?

    Best regards,
    Niklas

    #1123415

    Hey Niklas,

    Thank you for using Enfold.

    You can use this css code to remove the default flags or the switcher added by the theme.

    .avia_wpml_language_switch, .avia_wpml_language_switch li {
        display: none !important;
    }

    Best regards,
    Ismael

    • This reply was modified 5 years, 4 months ago by Rikard.
    #1123534

    Hello Ismael,

    Thank you. This works.
    If someone else is having the same problem: There is also missing an “i” in the code at “!important”.

    Thanks for the help and best regards,
    Niklas

    #1123748

    Hi Niklas,

    Great, I’m glad that you got it working and thanks for the feedback. I’ve edited Ismaels reply so that the code is correct.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.