Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #192912

    Hello there!

    I just purchased WPML for my website and I would like to know how to add the dropdown language menu to the header (next to the social icons for example), since I don’t have any sidebars. I know I have to paste it in the header.php file but I don’t know where exactly. Can I paste the code in the wordpress code editor? (of course the one where header.php appears. Or do I need to open the header.php from the enfold file that I downloaded and then add it through filezilla.

    This is the website http://www.binoclelab.com

    Thanks a lot!

    Nora

    • This topic was modified 4 years, 10 months ago by Yigit.
    #193650

    Hey Nora!

    Please refer to Peter’s post here https://kriesi.at/support/topic/wpml-flags-of-fixed-menu-with-social-icons-as-dropdown/#post-130278
    You can edit Header.php file in Appearance > Editor.

    Best regards,
    Yigit

    #349521

    Exact same problem here:)

    but my header.php does not contain this code:

    do_action('avia_meta_header');

    What to do?

    Regards!

    #350263

    Hi!

    Look here:
    /enfold/includes/helper-main-menu.php

    Regards,
    Josue

    #350283

    Hey!

    First, you have to remove the theme’s default flag configuration with this on 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);
    }

    Use this again on functions.php file to add the WPML language selector:

    add_action('avia_meta_header', 'ava_icl_language_selector');
    function ava_icl_language_selector(){
    	do_action('icl_language_selector');
    }

    Cheers!
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Enfold heading with WPML’ is closed to new replies.