Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is trying to add a flag button for language selection on their website using the Salient theme. They can only get it working in the footer area but not in other places.
Solution:
We recommend adding a language switcher in the top menu by navigating to WPML > Languages > Main Menu Switcher section. From there, you can add a language switcher as explained here: Language Switcher Options.
Additionally, you can add a language switcher anywhere on the site using shortcodes or custom coding. For more details, visit: Adding Language Switchers using PHP and Shortcodes.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 5 replies, has 1 voice.

Last updated by Mihai Apetrei 3 months ago.

Assisted by: Mihai Apetrei.

Author Posts
January 24, 2025 at 5:23 pm #16632283

ralfS-26

Background of the issue:
I am trying to add a flag button on my site hidden link so that visitors can choose the language.

Symptoms:
I need guidance on how to add a language selection button.

Questions:
How can I add a flag button for language selection on my site?

January 24, 2025 at 6:28 pm #16632388

ralfS-26

I am running Salient theme.

I can only get it working in the footer area but not on all other places.

January 24, 2025 at 6:29 pm #16632389

ralfS-26

1

January 24, 2025 at 6:29 pm #16632392

ralfS-26

xy

January 24, 2025 at 6:30 pm #16632393

ralfS-26

I am not sure if this ticket is open again. It shows a checked hook,

January 24, 2025 at 6:53 pm #16632455

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Yes, the ticket is open.

You can add a language switcher in the top menu, for example, by going to WPML > Languages > Main Menu Switcher section > and from there, you can add a language switcher as explained here:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/

You can also add a language switcher anywhere on the site by using shortcodes or custom coding:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/

I hope that you will find this information helpful.

Mihai Apetrei