This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by sallyR 2 years, 8 months ago.

Assigned support staff: Joanna.

Author Posts
September 1, 2017 at 7:04 am #1355716

sallyR

Im need to move the shown flag symbols out of the menu, and place them above the main menu. Is there a css or a short code to accomplish this?

Thx

September 1, 2017 at 11:42 am #1355925

Joanna

Hello @sallyr,

Yes, you can add a language switcher in a custom place.

You can add WPML’s language switcher to your theme files, using one of these hooks:

1. wpml_add_language_selector – Display WPML’s drop-down language switcher
https://wpml.org/wpml-hook/wpml_add_language_selector/

2. wpml_footer_language_selector – Display WPML’s horizontal language switcher
https://wpml.org/wpml-hook/wpml_footer_language_selector/

You can also use the following shortcodes:
https://wpml.org/documentation/support/wpml-coding-api/shortcodes/

Then, you can specify the custom language switchers option in WPML->Languages->Custom language switchers or WPML->Languages->Footer language switcher (depending on the hook or shortcode that you used).

Related documentation:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#custom-locations

September 1, 2017 at 12:49 pm #1356004

sallyR

Hello Joanna, thanks for the reply. Which Code I need to show the Flags in the Header?

September 1, 2017 at 5:31 pm #1356263

Joanna

Hello sallyR,

In the header, I would use the following code:

do_action( 'wpml_add_language_selector' );

Please check the screenshot to see where you can customize that language switcher and set e.g. flags only.

September 4, 2017 at 10:22 am #1357384

sallyR

Thanks Joanna, now it works

best regards
Sally