Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    #466971

    Hi 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,
    Elliott

    #466992

    Hello 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

    #467698

    Hey!

    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,
    Elliott

    #469145

    Dear 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.php

    I also keep getting Blank-page Errors

    I hope you can help.
    Thank you!
    Timo

    #469156

    Hey!


    @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,
    Yigit

    #469245

    Thank you! Works Perfect!! Just what I needed it to do :)

    #469303

    Hey!

    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 thread

    Best regards,
    Yigit

    #469498

    Thanks for your help Yigit and Elliott. All sorted now.

    Pauline

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Blank screen after updating language flag settings in functions.php’ is closed to new replies.