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?
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');
}
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
Hi i also would like to do this on https://www.gyldgift.nl/ what are the steps i have to make exactly… thanx!
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
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?
Hi CONCEPTENCREATIE,
Language switcher display can be configured in WPML options.
Best regards,
Victoria