Tagged: remove flags, wpml
Hi
I’ve installed WPML and set the configuration to display “Native Language Name” (and not the flags)…. The website then still showed the flags only. So I had a look through your Support pages and found the following thread.
https://kriesi.at/support/topic/wpml-customization/#post-352885
I applied the solution given in this thread, but now I do have the EN | DE showing up in the slider (top right corner). I would like it to sit in the top bar, where it currently says “English”. I am currently not seeing where I am going wrong. Would you be able to have a look?
Please find login details below.
Thanks so much.
Hey Corina!
Thank you for using Enfold.
Please undo all modifications made on theme. Add this to the functions.php file to remove the theme’s default flag switcher:
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);
}
Go to the WPML > Languages panel. Enable the Display the language switcher in the WP Menu. Select your main or secondary menu. Set the Language switcher style to Drop-down menu.
Best regards,
Ismael