Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #766754

    Hallo,

    Is it possible to hide the language switcher from WPML.

    Thx

    #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,
    Basilis

    #766902

    Dear 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

    #767205

    Hi,

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

    #767268

    Dear Nikko,

    I load it up (functions.php – alusportbe) like you ask.

    Thankx

    Reagards

    Raf

    #768082

    Hi,

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

    #768098

    Hello 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

    #768102

    Hi!

    That is an option too :)
    Glad it is working! Let us know if you have any other questions or issues!

    Cheers!
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘WPML – remove or hide the language switcher’ is closed to new replies.