Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #884249

    Hi,

    I am trying to hook this function just before hamburger menu at the header with a small margin like 20px?

    add_action( 'ava_main_header', 'wpml_switch_to_header' );
    function wpml_switch_to_header() {
    	echo do_action('wpml_add_language_selector');
    }

    I tried to add it to header and custom CSS but the element goes outside container.

    As a reference this demo: https://kriesi.at/themes/enfold-visual-artist/
    I want to place my customized WPML language switcher just before the hamburger icon on the left side with a small margin(20px) but I cannot find any hook to add the WPML code just before the hamburger toggle.

    Any workaround?

    #884251

    Found it myself. I hooked this after main menu which is still in main container area:

    add_action( 'ava_after_main_menu', 'wpml_switch_to_header' );
    function wpml_switch_to_header() {
    	echo do_action('wpml_add_language_selector');
    }
    #885148

    Hi L,

    Glad you got it working for you! And thank you for sharing :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #887558

    Hi i also would like to do this on https://www.gyldgift.nl/ what are the steps i have to make exactly… thanx!

    #887783

    Hi CONCEPTENCREATIE,

    Did you try the code posted by L in your child themes functions.php file?

    add_action( 'ava_after_main_menu', 'wpml_switch_to_header' );
    function WPML_switch_to_header() {
    	echo do_action('wpml_add_language_selector');
    }

    Best regards,
    Rikard

    #887794

    Hi Rikard,

    Thanx, but now i get this (download in private content) … we are getting there – however i just want to have the flag selector. Is this possible?

    #887905

    Hi CONCEPTENCREATIE,

    Language switcher display can be configured in WPML options.

    Best regards,
    Victoria

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