Skip to content Skip to sidebar

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

Problem:
You are trying to translate buttons in Elementor that link to a custom post type or other pages, using post IDs for linking. While some buttons correctly update to the translated URL, others do not, and occasionally the URL field is missing in the translation editor.
Solution:
Firstly, ensure that system fields like

_elementor_data

are not modified as they should remain in their default state to avoid issues. For buttons, using type="link" in Elementor should automatically direct internal links to the translated versions of the posts/pages. If these fields are set correctly, they won't appear in the Translation Editor because they are automatically configured to point to the correct translation.
If the URL field does not appear in the Translation Editor, you can locate the URLs by following the steps outlined here: https://wpml.org/faq/how-to-translate-links/#translating-external-links
Additionally, you can find the necessary XML for any widget automatically through this link: https://wpml.org/documentation/support/multilingual-tools/registering-custom-elementor-widgets-for-translation/

If this solution does not resolve your issue or seems outdated, we 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. If problems persist, please open a new support ticket with us for further assistance.

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 7 replies, has 0 voices.

Last updated by geogramaS 6 days ago.

Assisted by: Bruno Kos.

Author Posts
September 30, 2025 at 4:00 pm

geogramaS

Background of the issue:
I am trying to translate buttons created in Elementor that link to a custom post type ('Casos de Éxito') or other pages. All posts in that CPT have translations completed. The buttons are set to link using the post ID (not a manually typed URL). Link to a page where the issue can be seen: hidden link

Symptoms:
Some buttons are correctly updated to the English URL, but others remain linked to the Spanish URL. In some cases, the URL field does not appear at all in the translation editor, so I cannot fix it manually.

Questions:
Why do some Elementor buttons correctly switch their URL to the translated entry while others do not?
Why does the URL field not appear in the translation editor for some buttons?

October 1, 2025 at 6:01 pm #17449911

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I’ve thoroughly debugged the issue and found that the child theme was causing the problem. It seems to contain some custom code or XML that interferes with the translation. When switching to the parent Elementor theme, the button links appear correctly for translation.

You can see it working here: hidden link

Could you please review and confirm on your side?

Thank you for your cooperation and patience

October 2, 2025 at 6:38 am #17450578

geogramaS

Hi Noman,

Thanks for your update. Just to clarify: in the child theme we added a wpml-config.xml file with the following code:
<?xml version="1.0"?>
<wpml-config>
<custom-fields>
<custom-field action="translate">_elementor_data</custom-field>
<custom-field action="copy">_elementor_edit_mode</custom-field>
<custom-field action="copy">_elementor_version</custom-field>
<custom-field action="copy">_elementor_template_type</custom-field>
</custom-fields>

<elementor-widgets>
<!-- HTML widget: copy the content (for tsparticles, etc.) -->
<widget name="html">
<fields>
<field key="html" type="HTML">
<translation>copy</translation>
</field>
</fields>
</widget>

<!-- Button widget: expose the link field for translation -->
<widget name="button">
<fields>
<field key="link" type="Link">
<translation>translate</translation>
</field>
</fields>
</widget>
</elementor-widgets>
</wpml-config>

We added this file because:

We needed the HTML widget field to be copied to translations (so a custom <div> for tsparticles in homepage is preserved across languages).

We also wanted the Elementor Button link field to appear in the Translation Editor, since some buttons were not updating automatically to the translated URL and the field wasn’t visible to adjust manually.

Could you please confirm if this configuration conflicts with the way WPML handles Elementor links, or if we need to adjust/remove specific parts of it?

If I remove this XML configuration as you suggest, how can I make sure the HTML widget (with the <div id="tsparticles-hero"> used for the particle animation) is preserved across translations?

Thanks again for checking this in detail.

Ellie

October 2, 2025 at 10:22 am #17451569

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi Ellie,

System fields such as _elementor_data should in general not be changed, as they can cause issues if translated or set differently as they are by default. I’m attaching a screenshot to show you how these are by default.

Also, type="link" will make internal links automatically point to the translated version of that post/page. Because of this, if you add these, they will not appear in the Translation Editor.
https://wpml.org/documentation/support/language-configuration-files/register-page-builder-content-for-translation/

Not sure if you’ve used it yet, but you can also get the required XML for any widget automatically here:
https://wpml.org/documentation/support/multilingual-tools/registering-custom-elementor-widgets-for-translation/

Also, if the URL is not available, you can try finding them like this:
https://wpml.org/faq/how-to-translate-links/#translating-external-links

Does it the above help? Let me know!

elementor.jpg
October 2, 2025 at 10:59 am #17451699

geogramaS

Hi,

Thanks for clarifying. I understand now that _elementor_data should not be modified, and that using type="link" makes the links switch automatically but not appear in the Translation Editor. I’ve already removed the custom XML I had added.

The only reason I added it before was because the HTML widget with my <div id="tsparticles-hero"> (particle animation) wasn’t being copied into the English version. Could you please confirm the recommended way to ensure that this HTML widget is preserved across languages without editing _elementor_data? That’s the only part I still need to solve.

Thanks again,
Ellie

October 2, 2025 at 11:59 am #17451939

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you show me exactly where this HTML widget with

<div id="tsparticles-hero"> 

is placed? For example, is it on this page: hidden link? Screenshots would really help.

October 2, 2025 at 2:57 pm #17452453

geogramaS

Hi,

Yes, the HTML widget with <div id="tsparticles-hero"> is placed in the hero section of this page:
hidden link

On the Spanish version you can see the particle animation in the hero, but if you switch to the English version it doesn’t appear.

Thanks,
Ellie 🙂

Screenshot at Oct 02 16-55-46.png
October 3, 2025 at 7:13 am #17453536

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you tell me where the tsparticles-hero comes from? Is it part of a code package, a post, or maybe a template?

I noticed that the English page actually has it, but for some reason, it doesn’t render on the frontend. I also don’t see any errors in the browser console.

paricles.jpg
rendering empty.jpg
October 3, 2025 at 12:38 pm #17454425

geogramaS

Hi,

Thank you for checking this in detail. I’ve just realized the issue was that my enqueue code in functions.php was limited to the Spanish page ID only (419). The English page has a different ID (4120), so the script wasn’t being loaded there.

I’ve updated the code to include both IDs, and now the particles are showing correctly on both versions.

Really appreciate your time and help in debugging this!

Best,
Ellie