Skip Navigation

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

Problem:
You are trying to translate the slug from

https://onlymedia.lt/en/musu-projektai/

to

https://onlymedia.lt/en/our-projects/

, but this translation is not available in custom post type translations due to a WPML limitation.
Solution:
Currently, translating the slug in this scenario is not possible because WPML only allows the

has_archive

to be set to a string. If the string value is set to something other than

rewrite['slug']

, or if the custom post type name slug is not set, the archive slug will not be translatable. We recommend checking the documentation on translating slugs for custom post type archives for more information.

If this solution does not apply to your case, or if it seems outdated, please open 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, you can contact our support team at WPML support forum.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Dražen 3 months ago.

Assisted by: Dražen.

Author Posts
September 18, 2024 at 11:54 am

dainiusV-2

Background of the issue:
I am trying to translate the slug hidden link to hidden link on my site hidden link. This slug is not available in custom post type translations.

Symptoms:
The slug translation is not available in custom post type translations.

Questions:
How can I translate the slug hidden link to hidden link?

September 18, 2024 at 12:29 pm
September 18, 2024 at 12:36 pm #16193032

Dražen
Supporter

Languages: English (English )

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

Hello,

I have checked further, and that is not possible, as is WPML limitation. I have reverted the settings on your live website.

"WPML allows has_archive to be set to a string. However, if the string value is set to something other than rewrite['slug'], or the custom post type name slug is not set, the archive slug will not be translatable."

Regards,
Drazen

September 18, 2024 at 12:39 pm #16193034

dainiusV-2

I should write to Woodmart support? They said that their these is fully WPML supported. But as we can see not Projects or Portfolio.

September 18, 2024 at 12:52 pm #16193169

Dražen
Supporter

Languages: English (English )

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

Hello,

you can try and they can contact our team, as we collaborate on this to try and find a solution in the future. But for now in general it is not possible in such case as it is WPML limitation. It is more WPML limitation then Woodmart fault.

- https://wpml.org/documentation/support/translating-slugs-for-custom-post-type-archives/

Regards,

Drazen

September 18, 2024 at 1:01 pm #16193240

dainiusV-2

Thank you Dražen!