Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #735462

    Hey there!
    Here is my website : tennisjoy.net
    Obviously, I use ENFOLD theme and recently have purchased WMPL plugin.
    The issue is that I cannot remove enfolds language switches.
    I have tried with Quick css, but then dropdown list disappears as well.

    Don’t know why, but editing functions.php file doesn’t help me as well.
    I tried to add:

    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);
    }
    
    add_action('avia_meta_header', 'add_custom_content_to_header');
    function add_custom_content_to_header() {
            do_action('icl_language_selector');
    }
    • This topic was modified 7 years, 11 months ago by nribakovs.
    #736534

    Hey nribakovs,

    Please try using following code instead

    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

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