Tagged: wpml language selector
-
AuthorPosts
-
October 30, 2016 at 10:16 pm #705894
Hi,
I tried the following code to my child’s theme function.php file, but it won’t disable the default language switcher after the search icon?
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); }Any idea on how to resolve this, now i have two language selectors?!
Thanks,
Patrick
October 30, 2016 at 11:46 pm #705907Hey vanwoods,
Try this code instead and let me know if it works:
add_action('init','ava_remove_lang_flags', 9999); function ava_remove_lang_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('avia_after_footer_columns', 'avia_wpml_language_switch', 10); }Best regards,
JordanNovember 12, 2016 at 4:36 pm #711456Hi Jordan,
Thanks for the solution this works fine! However what do i need to add to this code so that it will hide the WPML menu in de footer and widgets area also?!
Thanks,
vanWoods
November 13, 2016 at 9:07 am #711562Hi,
Please try the following in Quick CSS under Enfold->General Styling:
#socket .menu-item-language { display:none; }Best regards,
RikardNovember 13, 2016 at 9:40 am #711575Hi Rikard,
Thanks for the quick reply!
I added “important” and the extra class for the widget switcher. Now it works as the client needs it.
#socket .menu-item-language, .avia_wpml_language_switch_extra { display:none !important; }Regards,
vanWoods-
This reply was modified 8 years, 11 months ago by
vanwoods.
November 13, 2016 at 10:08 am #711583 -
This reply was modified 8 years, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
