-
AuthorPosts
-
December 3, 2017 at 4:34 am #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?
December 3, 2017 at 4:52 am #884251Found 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'); }December 5, 2017 at 4:52 pm #885148Hi L,
Glad you got it working for you! And thank you for sharing :)
If you need further assistance please let us know.
Best regards,
VictoriaDecember 11, 2017 at 8:28 pm #887558Hi i also would like to do this on https://www.gyldgift.nl/ what are the steps i have to make exactly… thanx!
December 12, 2017 at 8:13 am #887783Hi 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,
RikardDecember 12, 2017 at 9:43 am #887794Hi 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?
December 12, 2017 at 1:20 pm #887905Hi CONCEPTENCREATIE,
Language switcher display can be configured in WPML options.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.
