Passer la navigation

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par Nicolas V. Il y a 1 année et 11 mois.

Assisté par: Nicolas V..

Auteur Messages
juillet 7, 2023 à 9:29 pm #13970405

mohssineA

The problem i have is, when i use wpml with my theme, the language switcher appear only when i click on the button menu, i don't want that, i want the language switcher to appear in the top of my website in the header ( keep in mind that i can't control the header because it's a template i can only change the logo the menu components

WhatsApp Image 2023-07-07 at 22.27.19.jpeg
juillet 7, 2023 à 9:48 pm #13970447

Nicolas V.
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum. If I understand correctly your situation:
- You have a language switcher that is associated with your menu, right?
- So on mobile, you need to click on the icon to open the menu and see the language selector
- But you want to have that selector outside the menu, at the top (probably in the red header), right?

I don't know how your template works it will most probably need custom work here because that's not the default behavior of our selector.

- If you go to "WPML > Languages > Custom language switchers" you can enable a custom language switcher. You will be able to implement that language switcher anywhere on your template using either a shortcode [wpml_language_selector_widget] or a PHP directly in the template PHP file:

do_action('wpml_add_language_selector');

You will find all the information on that page:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/

juillet 8, 2023 à 2:02 pm #13971549

mohssineA

That's exactly what I need but the problem is, I am using the themeforest yummi theme, and it doesn't allow to add sequences in the header, like I have 4 choices of headers I can't customise

juillet 9, 2023 à 12:15 pm #13972701

mohssineA

hope you understand

Cs.JPG
juillet 10, 2023 à 11:10 am #13977793

Nicolas V.
Supporter

Les langues: Anglais (English ) Français (Français )

Fuseau horaire: America/Lima (GMT-05:00)

Hello,

If you want a custom solution, then you should create a child theme (from your themeforest theme) and edit the PHP template for your header.
Ref: https://developer.wordpress.org/themes/advanced-topics/child-themes/

Custom work is out of the scope of our support, so if you don't feel comfortable doing it by yourself, I would suggest you consider contacting one of our certified partners from this link:
http://wpml.org/documentation/support/wpml-contractors/

Before doing so please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

You will get the custom assistance you need to get on with your project.