Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #868387

    I’m developing this site: http://proyecto1.enredamecomunicacion.com

    I have installed WPML as I need to manage two languages. When I added the plugin, a language switcher appeared on the secondary menu area (header_meta). I have now added the WPML language switcher, which is editable, as I don’t want flags to appear there and instead I just want the short text for the language. I can’t see how to delete the default enfold language switcher. I have tried several codes:

    .av-language-switch-item {display: none;
    }

    And

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

    But I still get the flags switcher there. (you can see it in the site). beside the WPML text switcher.

    How can I get rid of it?

    Thanks a lot!

    #868786

    Hey jaumellagostera,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
    You should be able to disable them in the WPML settings.

    Best regards,
    Victoria

    #868939

    Hey Victoria!
    I have already tried disabling ALL switchers I created using WPML. Even so, I still get the flag switcher I don’t want.
    I’m giving you temporary access to the site.

    Thanks a lot for your support.
    Jaume

    #868945
    .avia_wpml_language_switch {
        display: none !important;
    }
    #869146

    Thanks a lot! That code worked perfect!!

    Best,
    Jaume

    #869425

    Hi,

    Great, glad you got it working and thanks @guenni007 for helping out :-)

    Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #877012

    Hi,

    I am currently developing and interpreting the following site www. storylistening.de using WPML.

    However, I have the same problem with the flags at the header (top right). They automatically appear next to each other as soon as another language is set visible although no language switcher has been created or turned on with WPML settings. I would like to have simple dropdown switch which would now always appears in addition to the “permanent” flags when created with WPML settings.

    Have tried several codes with Quick CSS that I have found here in the forum in order to get rid of the flags (e.g. .avia_wpml_language_switch {
    display: none !important;
    }.
    Unfortunately, none of them worked so far.

    Many thanks in advance!
    Best
    Olaf

    • This reply was modified 7 years ago by SRP.
    #878263

    Hi Olaf,

    Here is the code you can put in Enfold > General Styling > Quick Css,  if it does not work, put into themes/enfold/css/custom.css

    
    .av-language-switch-item {
      display: none;
    }
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #878784

    Hello Victoria,
    worked perfectly with Quick CSS!
    Many thanks for your quick, kind and helpful support!

    Best regards
    Olaf

    #879231

    Hi Olaf,

    Glad we got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #918430

    is there a better way to fully disable these flags, instead of just hiding them via css?

    #918899

    Hi,

    You can use this hook.

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

    Best regards,
    Ismael

    #930034

    Hello,
    On this site

    I also installed WPML menu, I tried to remove the flags from the secondary menu, I would like to see only the simple text (for example ITA or ENG), without flags. I tried the css suggested here, unfortunately without results.
    how could I do?
    Best regards
    Greta

    #930856

    Hi,

    Please contact WPML support for this type of help.
    https://wpml.org/forums/topic/remove-flags-and-replace-with-language-switcher-text/

    Best regards,
    Basilis

    #1314203

    @Ismael

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

    is possible that this code din’t work with the actual Enfold+WPML and WP 5.7/5.8 ?

    #1314658

    Hi,

    The 2 filters have been deprecated, the action is still valid.

    There is a new theme option “Enfold WPML Language Flags” in Header Tab.

    That should remove the flags.

    Best regards,
    Günter

    #1369190
    This reply has been marked as private.
    #1369642

    Hi @pikkuapuri,

    No, there is not any changes regarding WPML. Have you disabled the flags in Enfold theme options > Header > Extra Elements > Enfold WPML Language Flags?

    Best regards,
    Yigit

    #1369645

    Of course. Usually works, but not now. The default language (finnish) flag stays glued?

    #1369670

    Hi,

    I could reproduce the issue on my local installation as well. I will report the issue to our devs. In the meantime, please add following code to functions.php file in Appearance > Theme Editor

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

    Best regards,
    Yigit

    #1369685

    That worked, thanks!

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