Skip to content Skip to sidebar

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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 7 replies, has 0 voices.

Last updated by Kor 12 hours, 49 minutes ago.

Assisted by: Kor.

Author Posts
August 8, 2025 at 9:22 am #17304852

arnoP-3

<b>Background of the issue: </b>
Hi, I am trying to translate links for a new post type. I set the post type to 'translatable' and created posts with translations. Initially, the translate setting switched back to 'not translate', but I resolved this by adding a configuration to the WPML XML Configuration: <custom-types> <custom-type translate="1">details</custom-type> </custom-types>.

I also set specific fields to translate links: <custom-fields> <custom-field action="translate" translate_link_target="1">block_button_url</custom-field> <custom-field action="translate" translate_link_target="1">content_must_knows</custom-field> </custom-fields>.

<b>Symptoms: </b>
Some links on translated posts are using the English URL instead of the German URL, even when the links are inside fields set to translate links.

<b>Questions: </b>
How can I solve the issue of links on translated posts pointing to the English URL instead of the German URL?

August 11, 2025 at 12:50 am #17308017

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for contacting us.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

August 11, 2025 at 4:16 pm #17310873

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I've checked, and I can see the untranslated links using the Advanced Translation Editor as shown in the attached screenshot.

I've tried both methods listed here https://wpml.org/faq/how-to-translate-links/#fixing-links-that-point-to-the-wrong-translation and it's not working.

It looks like WPML failed to identify the translated custom posts and you'll need to manually correct it.

Screenshot_344.png
August 12, 2025 at 7:32 am #17312204

arnoP-3

Thanks Kor.

On the live site, I clicked the "unlock" option in the translator and corrected the link manually. It did not change in the frontend yet. Perhaps because of caching, but it's already 16 hours ago, and still nothing changed. Did this work for you on the staging site?

Even if it works, how come WPML failed to identify the translated custom posts? If everything is setup correctly, I suppose this is a bug?

Kind regards,
Arno

August 12, 2025 at 4:53 pm #17314311

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I found that the link was not translated into German, so I’ve updated it for you as shown in the attached screenshot. The link "Alle Preise und Rabatte finden Sie hier" is now working at hidden link

If you’d like us to investigate further why the links are not pointing to the translated page automatically, please replicate the issue on our sandbox site hidden link . You can install the necessary plugins there to reproduce the problem. Then, I will escalate this to our 2nd Tier Support for further investigation.

Screenshot_357.png
August 14, 2025 at 9:34 am #17320303

arnoP-3

I translated on the live site and couldn't see the translation in the frontend. But it works now, so I must have done something wrong before.

So, unlocking and translating the links manually works. But that's too much work going forward. The links need to be translated automatically, just like all links to other post types.

I reproduced the same issue on the sandbox site. I created a custom post here:
hidden link
I translated it too.

On this page, the link to that post remains English: hidden link

There is one other strange thing: the custom post type doesn't even load in the frontend. This is a correct URL, but it throws a 404 error page: hidden link
This might be a sandbox-specific problem, because it works fine on our website.

WordPress does "see" the custom post type: it pops up in the dropdown when creating a link to it. So I would think that WPML should be able to get the German URL.

Just a wild guess: maybe WPML can't deal with the slug "details"?

I hope this is sufficient for you to fix this.

Thanks!

August 14, 2025 at 5:29 pm #17321815

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Please allow me to escalate this to our 2nd Tier Support for further investigation. I will come back to you once I've feedback.

August 15, 2025 at 2:49 pm #17323914

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. While preparing a report, I tested this on a new page and it works fine hidden link .

Let me show you a screen recording. hidden link . Could you recheck and see if you've left out any options?