Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #705894

    Hi,

    I tried the following code to my child’s theme function.php file, but it won’t disable the default language switcher after the search icon?

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

    Any idea on how to resolve this, now i have two language selectors?!

    Thanks,

    Patrick

    #705907

    Hey vanwoods,

    Try this code instead and let me know if it works:

    add_action('init','ava_remove_lang_flags', 9999);
    function ava_remove_lang_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('avia_after_footer_columns', 'avia_wpml_language_switch', 10);
    }

    Best regards,
    Jordan

    #711456

    Hi Jordan,

    Thanks for the solution this works fine! However what do i need to add to this code so that it will hide the WPML menu in de footer and widgets area also?!

    Thanks,

    vanWoods

    #711562

    Hi,

    Please try the following in Quick CSS under Enfold->General Styling:

    #socket .menu-item-language {
      display:none;
    }

    Best regards,
    Rikard

    #711575

    Hi Rikard,

    Thanks for the quick reply!

    I added “important” and the extra class for the widget switcher. Now it works as the client needs it.

    #socket .menu-item-language, .avia_wpml_language_switch_extra {
     display:none !important;
    }

    Regards,
    vanWoods

    • This reply was modified 8 years ago by vanwoods.
    #711583

    Hi,

    Great, glad you got it working and thanks for the feedback :-)

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.