Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #848206

    Hey guys,

    How do I disable Enfold’s default language switcher ? I’ve tried the following code inside the function.php file, but it doesn’t do anything.

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

    I’ve also tried hiding .av-language-switch-item with CSS. The problem with this option is that the switcher is still displaying in the hamburger mobile menu.

    #848706

    Hey Phet,

    Please use the code as following 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

    #848770

    Thanks Yigit! This code did work.

    #848771

    Hi,

    You are welcome! :)

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Disable default Enfold language switcher, when WPML is enable’ is closed to new replies.