Tagged: wpml
Hi, would like to switch of the language switcher on various locations.
Disabled the function already under WPML»languages however still showing up.
Please find the document here:
https://www.evernote.com/l/AdTC1QgwuRlFdbJ-PLv-KXz1UmunjMIgVEY
WP + FTP login & credentials can be found under private content.
Best regards.
Martijn
Hey Neroodmi!
Please add this on functions.php to remove the theme’s default flags:
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);
}
You can then set the flags on the WPML option page (WPML > Display the language switcher in the WP Menu setting).
Best regards,
Peter
Hi Dude,
Please find the error attached after inserting the code:
https://www.evernote.com/l/ADfphg5VUnlE5bcf8BggmG5lsuv4BvpPvHM
Awaiting your reply.
Best regards.
Martijn
Hi Martijn!
That normally happens when you copy the code directly from the mail notification, i’ve now added it to the theme functions.php via FTP.
Cheers!
Josue
Thanks very much Josue!
One more question. Would I be able to turn of the footer too?
What about: This post is also available in: Spanish
Best regards.
Martijn
Hey Martijn!
Try adding this code to the Quick CSS:
.icl_post_in_other_langs, #lang_sel_footer {
display: none;
}
Cheers!
Josue
Thanks Josue!
All the best.
Martijn