Tagged: Flag, remove menu, wpml
Hi,
how can i remove the wpml language flags in my main-menu? I want to show the language switcher only.
Thanks
I solved it by adding this to the 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);
}