Tagged: WPML Flags
I successfully removed the flags with CSS I found on the forum and it works great on the English version but the flags still appear on the French side. What do I need to do to fix this?
Here is the CSS I have so far:
/*WPML Flag removal from top bar*/
.avia_wpml_language_switch li .language_flag {
display: none;
}
Hey beverlystone,
Add the following to the functions.php file:
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,
Jordan Shannon
Is there any way to do this with CSS so I don’t have to create a child theme? Otherwise, I will lose this code each time the theme is updated.
Hi,
You can add a functions.php to child theme.
Best regards,
Jordan Shannon
But I’m asking if I can do it with CSS. I’d prefer to not do a child theme unless I have no other choice.
Hi beverlystone,
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
.avia_wpml_language_switch.avia_wpml_language_switch_extra {
display: none;
}
If you need further assistance please let us know.
Best regards,
Victoria
That works great! Thank you so much. :-)
Hi beverlystone,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria