Hello there!
I just purchased WPML for my website and I would like to know how to add the dropdown language menu to the header (next to the social icons for example), since I don’t have any sidebars. I know I have to paste it in the header.php file but I don’t know where exactly. Can I paste the code in the wordpress code editor? (of course the one where header.php appears. Or do I need to open the header.php from the enfold file that I downloaded and then add it through filezilla.
This is the website http://www.binoclelab.com
Thanks a lot!
Nora
Hey Nora!
Please refer to Peter’s post here https://kriesi.at/support/topic/wpml-flags-of-fixed-menu-with-social-icons-as-dropdown/#post-130278
You can edit Header.php file in Appearance > Editor.
Best regards,
Yigit
Exact same problem here:)
but my header.php does not contain this code:
do_action('avia_meta_header');
What to do?
Regards!
Hi!
Look here:
/enfold/includes/helper-main-menu.php
Regards,
Josue
Hey!
First, you have to remove the theme’s default flag configuration with this on functions.php:
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);
}
Use this again on functions.php file to add the WPML language selector:
add_action('avia_meta_header', 'ava_icl_language_selector');
function ava_icl_language_selector(){
do_action('icl_language_selector');
}
Cheers!
Ismael