Tagged: wpml language switcher
-
AuthorPosts
-
March 25, 2017 at 10:54 pm #766754March 26, 2017 at 12:14 am #766772
Hi rafke!
Please use the following function and let us know if it works for you
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 ); }
Thank you
Regards,
BasilisMarch 26, 2017 at 10:28 am #766902Dear Basilis,
I put first the text into function.php but it got an error. “Parse error: syntax error, unexpected ‘function’ (T_FUNCTION) in /data/sites/web/alusportde/www/wp-content/themes/enfold/functions.php on line 568
I also put it into function-enfold.php but get this error “Parse error: syntax error, unexpected ‘function’ (T_FUNCTION) in /data/sites/web/alusportde/www/wp-content/themes/enfold/functions-enfold.php on line 1801
I don’t know in witch is the correct to put the text in but both don’t work.
Can I also copy the function.php and function-enfold.php to the enfold-child in the irectory where style.css is ?
Thankx a lot
Regards
Raf
March 27, 2017 at 6:25 am #767205Hi,
You don’t need to copy everything inside functions.php and function-enfold.php to the functions.php of the child theme since it will be inherited. Since it’s having an error on functions.php when you insert the code, can you upload the code in functions.php in http://pastebin.com/ and post the link here?
Best regards,
NikkoMarch 27, 2017 at 9:20 am #767268Dear Nikko,
I load it up (functions.php – alusportbe) like you ask.
Thankx
Reagards
Raf
March 28, 2017 at 12:24 pm #768082Hi,
Please use the code as following
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,
YigitMarch 28, 2017 at 1:15 pm #768098Hello Yigit,
It is not working. Nothing is happen.
I put follow in quick css
.language_flag img {
display: none!important;
}and I think is working.
Regards
Raf
March 28, 2017 at 1:19 pm #768102 -
AuthorPosts
- The topic ‘WPML – remove or hide the language switcher’ is closed to new replies.