Hi guys again!
Can you help me to display the language switcher of WPML in Enfold?
In default mode, the switcher with flags will be displayed here in the secondary menu. I think that’s not good.
What I’ve done: I could turn off the flag switcher in the secondary menu. Then I inserted the built-in switcher WPML in the secondary menu (text only). Then the flag switcher displayed as default in the main menu. I do not want too. However, I have not made it. Now everything is default again.
How it should be: no display of flags (not in the secondary and also not in the main menu). Only the switcher (as text) to be displayed in the secondary menu.
Is this possible? How can I customize?
Thank you in advance for your help.
Best regards. Ulrich
Hey adwordsfriends!
1) You can use this code to remove the default theme flags completely – insert it into the functions.php file:
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);
}
The WPML plugin should add the language dropdown to the menu if you tick the “Display the language switcher in the WP Menu” option and select the main menu (or secondary menu) in the dropdown: http://www.clipular.com/c/5697699709976576.png?k=tR7hiYan-r1Pht6Rl__rwYgcx8k
Regards,
Peter
Cool! Thanks, Peter.
It works fine. Excellent work.