Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #352138

    Hey,

    I’d like to put WPML language switcher in the header, next to small twitter icon. None of the methods I’ve seen in forums worked.
    Thanks.

    #352389

    Hi spadalbert!

    Thank you for using Enfold.

    Use this on functions.php to remove the default flag configurations:

    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 this to render the default language switcher:

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

    Move the position of the switcher using css.

    Regards,
    Ismael

    #352663

    Thanks Ismael, I’ll try it.

    #352681

    Hi!

    Great, please let us know if it doesn’t work for you.

    Best regards,
    Peter

    #352905

    Hi,

    It actually doesn’t work. I inserted the code as said, but I don’t see any language menu next to social icons in header.

    Best regards,

    #353151

    Hi!

    Do you mind creating a temporary admin login and posting it here privately so we can look into it?

    Regards,
    Yigit

    #353203
    This reply has been marked as private.
    #353322

    Hi!

    Can you please switch user role to administrator so we can see plugin settings?

    Cheers!
    Yigit

    #353372
    This reply has been marked as private.
    #353706

    Hey!

    Looks like you didn’t activate the header meta. Please replace the code with this:

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

    Regards,
    Ismael

    #354037
    This reply has been marked as private.
    #355798

    Hi!

    Replace the second code with the one I posted above. This should render the selector on the main header instead of the top header which is currently disabled in your setup.

    Best regards,
    Ismael

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