Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 1 year, 2 months ago.

Assisted by: Bobby.

Author Posts
January 30, 2024 at 9:12 am #15242158

angelaE

Hello, WPML team.

I'm trying to create a popup only for my english speakers, but the popup is showing in every language. I tried to change elementor_library only to show translated items but I cannot hide the popup in other languages.

I saw another forum thread where a user creates a user profile to assign the exclusion to the author and has assigned all pages to that user to exclude the languages. But I don't think it's right to have a user just for that. https://wpml.org/forums/topic/popup-should-only-be-shown-on-one-language-entire-site-not-on-all/

I tried to replicate it on a new demo site in case it was a plugin, theme or whatever, but the same thing happens.

Is there any way to hide these popups so that it appears in only one language?

Thanks for all.

January 30, 2024 at 7:19 pm #15246233

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi,

Yes, while that workaround works I do agree we can find a " better" way. I would like to add that as a quick workaround, you can also try to use some simple custom CSS and hide it in the secondary languages.

CSS allows you to target a specific language code only:
hidden link).

To further investigate I have created a sandbox for us. Please use the link below and reproduce the issue as simple as possible.

hidden link

January 31, 2024 at 9:22 am #15248130

angelaE

Hi, Bobby.

So you recommend to hide it with CSS. I replicated the situation in the demo site and create the popup only in spanish. I want to hide it in english in this demo. So the better way will be add this line (in the demo, I added in Customize > Custom CSS):

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

I would prefer not to load any of the popup, but I understand that Elementor will always load all popups and WPML can't block it based on the language. Is that correct?

I think this would solve the problem. Thanks for your help.

January 31, 2024 at 7:28 pm #15251422

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thanks for the update. I confirm that your CSS is functioning correctly in the sandbox.

On the ES version, the exit pop-up appears, but not on the EN version.

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 the Spanish version appearing in both languages when an English 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 two options apart from the CSS:

Change this setting by unlocking the "lock" icon and selecting either "Do not translate" or "Translatable - only show translated items." This removes the need for CSS.

However, be cautious: a "Locked" setting suggests potential issues upon modification, especially related to Elementor template translations.

Alternatively:

1. Duplicate or translate the template into English in Elementor Templates.
2. Edit this English 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.

Try these methods and let me know which one works best for you.

The topic ‘[Closed] Elementor native popup appears in all languages even it's not translated’ is closed to new replies.