-
AuthorPosts
-
June 30, 2015 at 10:50 am #466287
Hello
I have just updated Enfold to the latest version. Following this added the following code to the functions.php file as I have done each time I’ve updated Enfold. I found the code in this forum as a way of getting the flags to disappear when using WPML.
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);Each time this has worked perfectly but I am now left with a blank screen on my website. I tried undoing the page but it had no effect. I can’t even login to word press now as I just have a blank page.
Your help would be much appreciated.
Thanks
Pauline
July 1, 2015 at 2:01 pm #466971Hi PSchlenker!
It would be better to add it to a child theme, http://kriesi.at/documentation/enfold/downloads/.
Your code is missing an ending bracket.
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); }
Best regards,
ElliottJuly 1, 2015 at 2:32 pm #466992Hello Elliott
Thanks for your reply.Could you also help me how can I change this when I have a blank screen? When I click on functions.php its just blank. Do I need to change the actual file itself on my server rather than via the word press interface? If so could you let me know where I can find it. I’m a word press beginner!
Many thanks
Pauline
July 2, 2015 at 6:48 pm #467698Hey!
When you download the child theme the functions.php file should have this comment at the top.
/** * Add your own functions here. You can also copy some of the theme functions into this file. * WordPress will use those functions instead of the original functions then. * * Remove the comments before or around the sample functions and code to use theme. * @link http://kriesi.at/documentation/enfold/using-a-child-theme/ */
Just paste the code beneath that.
Regards,
ElliottJuly 6, 2015 at 5:44 pm #469145Dear Elliott,
I have a similar problem with my site, I’ve not tried every solution I could find on the forum to remove these flags.
– via CSS
– via functions.php
– via functions-enfold.phpI also keep getting Blank-page Errors
I hope you can help.
Thank you!
TimoJuly 6, 2015 at 5:55 pm #469156Hey!
@timodenijs Please try adding following code to Quick CSS in Enfold theme options under General Styling tab.html_header_sidebar #top .avia_wpml_language_switch { display: none!important; }
Regards,
YigitJuly 6, 2015 at 9:04 pm #469245Thank you! Works Perfect!! Just what I needed it to do :)
July 6, 2015 at 11:24 pm #469303Hey!
You are welcome glad we could help :)
We will keep the thread open for the OP. If you have any other questions or issues, please feel free to start a new threadBest regards,
YigitJuly 7, 2015 at 10:09 am #469498Thanks for your help Yigit and Elliott. All sorted now.
Pauline
-
AuthorPosts
- The topic ‘Blank screen after updating language flag settings in functions.php’ is closed to new replies.