Tagged: language switcher, WPML Flags
Hey,
since the new update the codes below don´t work any more for removing the language swither (WPML) from the header.
Would be great if you could help me to let them disappear again. Thanks!
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 CODE BELOW WAS THE LATEST WORKING ONE
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’);
Hey Denti,
You can hide those with css for now.
Here is the code you can put in Enfold > General Styling > Quick Css, if it does not work, put into themes/enfold/css/custom.css
#header_meta nav.sub_menu {
display: none;
}
If you need further assistance please let us know.
Best regards,
Victoria
Hey Victoria.
it worked! Thank you so much!
Best,
Denti
Hi,
I’m glad Victoria was able to help you. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon