Tagged: flags, language switcher, wpml
Hi, I’ve got a site using wpml, and am trying to remove the flags at the end of the main menu / replace with simple language switcher.
– I’ve placed the css:
#header_meta .avia_wpml_language_switch { display: none; }
#header_main .menu-item-language { display: none; }
#header_meta .sub_menu { float: right; margin-right: 15px; }
– In wpml settings added a switcher to the main menu but it doesn’t appear.
Using latest enfold version and wpml version.
Hey hutch80,
I removed your css for the quick ccs field and added this code to the end of your functions.php file in Appearance > Editor:
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');
The flags are now removed, please clear your browser cache and check.
Best regards,
Mike
Thanks so much!