Tagged: enfold, language flags
-
AuthorPosts
-
October 24, 2017 at 8:47 pm #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!
October 25, 2017 at 4:18 pm #868786Hey 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,
VictoriaOctober 25, 2017 at 8:37 pm #868939Hey 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.
JaumeOctober 25, 2017 at 8:55 pm #868945.avia_wpml_language_switch { display: none !important; }
October 26, 2017 at 9:28 am #869146Thanks a lot! That code worked perfect!!
Best,
JaumeOctober 27, 2017 at 7:32 am #869425Hi,
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,
RikardNovember 15, 2017 at 10:37 am #877012Hi,
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, 1 month ago by SRP.
November 17, 2017 at 7:22 pm #878263Hi 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,
VictoriaNovember 19, 2017 at 2:50 pm #878784Hello Victoria,
worked perfectly with Quick CSS!
Many thanks for your quick, kind and helpful support!Best regards
OlafNovember 20, 2017 at 5:10 pm #879231Hi Olaf,
Glad we got it working for you! :)
If you need further assistance please let us know.
Best regards,
VictoriaFebruary 27, 2018 at 1:20 pm #918430is there a better way to fully disable these flags, instead of just hiding them via css?
February 28, 2018 at 10:08 am #918899Hi,
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,
IsmaelMarch 20, 2018 at 6:31 pm #930034Hello,
On this siteI 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
GretaMarch 21, 2018 at 9:16 pm #930856Hi,
Please contact WPML support for this type of help.
https://wpml.org/forums/topic/remove-flags-and-replace-with-language-switcher-text/Best regards,
BasilisAugust 3, 2021 at 5:02 pm #1314203function 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 ?
August 5, 2021 at 1:24 pm #1314658Hi,
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ünterOctober 18, 2022 at 9:36 am #1369190This reply has been marked as private.October 20, 2022 at 6:05 pm #1369642Hi @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,
YigitOctober 20, 2022 at 6:33 pm #1369645Of course. Usually works, but not now. The default language (finnish) flag stays glued?
October 20, 2022 at 9:00 pm #1369670Hi,
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,
YigitOctober 21, 2022 at 6:05 am #1369685That worked, thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.