Passer la navigation

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
You are using WPML with Elementor Pro to build a multilingual site and have a newsletter pop-up subscription on your French Home page. You have translated your home page into English, but the pop-up is displayed on both the French and English versions, despite your intention to only show it on the French version.

Solution:
The issue arises because the WPML setting under WPML->Settings->Post Types Translation->My Templates (elementor_library) is set by default to "Translatable - use translation if available or fallback to default language." This setting causes the pop-up to appear in both languages when a translated version isn't available. Here are a few options to resolve this:

1) Change this setting by unlocking the "lock" icon and selecting "Translatable - only show translated items." This will also affect any other template you have set via Elementor.

2) Alternatively, you can:
- Duplicate or translate the template into the second language in Elementor Templates.
- Edit this template.
- In Elementor, select the container and go to Advanced -> Responsive. Set 'Hide on Desktop', 'Hide on Tablet', and 'Hide on Mobile', then save.

3) Hide the popup in the second language via CSS code. For example, to hide it in the English language, use the following code:

html[lang="en-US"] #elementor-popup-modal-60[style] { display: none !important }

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at WPML support forum.

100% of people find this useful.

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.

Marqué : 

Ce sujet contient 5 réponses, a 3 voix.

Dernière mise à jour par Dražen Il y a 1 année.

Assisté par: Waqas Bin Hasan.

Auteur Messages
mai 29, 2024 à 9:33 am #15682482

romainG-14

Contexte de la question:
I am using WPML with Elementor Pro to build a multilingual site. Currently, I have a newsletter pop-up subscription on my French Home page. I have recently translated my home page into English.

Symptômes:
The pop-up is displayed on both the French and English versions of the home page, despite my intention to only show it on the French version.

Questions:
How can I set conditions to display the pop-up only on the French version of my home page using WPML and Elementor Pro?
Why does the pop-up appear on both language versions of the home page even though I only set it to display on the French home page?

mai 29, 2024 à 10:03 am #15682672

Waqas Bin Hasan
Partisan de WPML depuis 05/2014

Les langues: Anglais (English )

Fuseau horaire: Asia/Karachi (GMT+05:00)

Hello Roman,

Thank you for contacting the support.

First of all, since you filed the ticket in French forum with English text, so I'd like to know your preference about further communication. Are you comfortable proceeding in English or 'd prefer a French speaker? Please let me know.

Besides your choice of language, please provide the debug information of your website for an overview of your setup. See https://wpml.org/faq/provide-debug-information-faster-support/ for more information.

I've enabled the debug information section for your next reply.

Additionally you can also take a look at https://wpml.org/faq/checklist-before-opening-a-ticket-in-wpml-support/ and cross-check for a few initial fixes.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

Regards.

mai 30, 2024 à 9:03 am #15686801

romainG-14

Hi,

English is fine. We can proceed in English then 🙂

mai 30, 2024 à 12:06 pm #15687847

Waqas Bin Hasan
Partisan de WPML depuis 05/2014

Les langues: Anglais (English )

Fuseau horaire: Asia/Karachi (GMT+05:00)

Thank you for confirming.

I checked the home page at lien caché and lien caché but can't find the said newsletter-popup. Can you please guide me how can I see it?

Secondly, please also let me know about the plugin responsible for the popup. I mean is it Elementor's built-in feature/module/element or coming from an addon or another plugin?

Further, I see you're using a multisite setup and probably that's why I am unable to determine currently installed versions of WPML plugins. Please make sure that you're using latest versions. There have been new releases just recently (https://wpml.org/fr/account/downloads/), please update to the latest versions (if needed) and recheck.

IMPORTANT: Please take full backup of your website and database beforehand. 

Please let me know and I'll try my best to further help you on the matter.

juin 1, 2024 à 4:16 pm #15694846

romainG-14

hi, thanks for your feedback, see bellow the answsers to your questions. Best 🙂

"I checked the home page at lien caché and lien caché but can't find the said newsletter-popup. Can you please guide me how can I see it?"
---> As it is not working for now, I have disabled the pop-up

"Secondly, please also let me know about the plugin responsible for the popup. I mean is it Elementor's built-in feature/module/element or coming from an addon or another plugin?"
---> Elementor (Pro) is responsible for the pop-up display. I created a template for the pop-up and I asked Elementor to display it on the home page with no other displaying condition.

"Further, I see you're using a multisite setup and probably that's why I am unable to determine currently installed versions of WPML plugins. Please make sure that you're using latest versions. There have been new releases just recently (https://wpml.org/fr/account/downloads/), please update to the latest versions (if needed) and recheck."
---> I am currently using the latest version of WPML Multilingual CMS

juin 3, 2024 à 5:58 am #15696178

Dražen
Supporter

Les langues: Anglais (English )

Fuseau horaire: Europe/Zagreb (GMT+02:00)

Hi there,

Waqas is off today, so I am taking care of this ticket, hope that is OK.

The issue you are experiencing with the pop-up is due to the WPML setting under WPML->Settings->Post Types Translation->My Templates (elementor_library), set by default to "Translatable - use translation if available or fallback to default language."

This results in appearing in both languages when a translated version isn't available.

Important Note: This is expected and set that way by our compatibility team which is why the option is "locked"

You have a few options on how to approach here:

1) Change this setting by unlocking the "lock" icon and selecting "Translatable - only show translated items." This removes the need for CSS. This will also affect any Other template you have set via Elementor.

2) Alternatively:

1. Duplicate or translate the template into 2nd language in Elementor Templates.
2. Edit this template.
3. In Elementor, select the container and go to Advanced -> Responsive. Set 'Hide on Desktop', 'Hide on Tablet', and 'Hide on Mobile', then save.

3) Hide the popup in 2nd language via CSS code, for example to hide it in English language code would be something like:

html[lang="en-US"] #elementor-popup-modal-60[style] { display: none !important }

Hope this helps.

Regards,
Drazen