-
AuthorPosts
-
July 29, 2019 at 12:46 pm #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-695476Ismael 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,
NiklasJuly 31, 2019 at 7:50 am #1123415Hey 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, 3 months ago by Rikard.
July 31, 2019 at 12:52 pm #1123534Hello 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- This reply was modified 5 years, 3 months ago by fairerocknroll.
August 1, 2019 at 5:56 am #1123748 -
AuthorPosts
- You must be logged in to reply to this topic.