Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #695534

    Hi
    I have the code snippet that should remove the language flags in my main menu, but since the last upgrade it seems to have stopped working. Here’s the code snippet in my child theme functions.php:
    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);
    }

    My website URL is: http://www.impactcrescendo.com/

    Can you please help find out why i would have stopped working.

    Thanks
    Lyse

    #695537

    Hi tremblayly!

    Please replace the code with following one

    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');

    Regards,
    Yigit

    #695733

    Hi Yigit,

    That worked! Thank you so very much.

    Lyse

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘WPML language flags in my main menu’ is closed to new replies.