Hi guys,
I just updated to 3.8 and suddenly the code I was given by you for WPML a couple of years ago to copy into the functions.php file doesn’t work anymore.
This is the code:
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);
}
Yet now all flags display on the homepage and on each site instead of being in a scroll box.
I’ve seen there’s a few other people here that are witnessing the same issue.
Can you help?
Thank you!
Antonio
Hey Antonio,
Please try using following code instead
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);
}
add_action('after_setup_theme','avia_remove_main_menu_flags');
Best regards,
Yigit
You’re a STAR Yigit!
This worked great and set everything back on track.
Thanks. You can mark this as solved.
Antonio
Hey!
Happy we could help.
Please feel free to let us know if we can do anything else for you.
Regards,
Basilis