Skip Navigation

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

Problem:
You are trying to translate the slug of your custom post type (CPT) 'Offer', but despite following the documentation and saving the permalinks again, the slug is not translated, resulting in 404 errors when accessing the links.
Solution:
If your CPT 'Offer' is created using custom code, you should first edit your code to change the slug. After modifying the slug, navigate to WPML-> Settings in your dashboard and translate the new slug, ensuring it differs from the previous translations. This adjustment should resolve the issue with the untranslated slug and the subsequent 404 errors.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. Additionally, we 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 https://wpml.org/forums/forum/english-support/.

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

Last updated by mattiaO 4 days, 2 hours ago.

Assisted by: Osama Mersal.

Author Posts
February 4, 2025 at 10:22 pm #16668592

mattiaO

Background of the issue:
I am trying to translate the slug of my custom post type (CPT) 'Offer' on my site hidden link. I have read many posts on this topic and followed the documentation at https://wpml.org/documentation/support/translating-slugs-for-custom-post-type-archives/. I tried saving the permalinks again but it did not help. The Redis plugin is NOT installed.

Symptoms:
The slug of my CPT is not translated, leading to 404 errors when accessing the links.

Questions:
How can I translate the slug of my custom post type 'Offer'?
Why are the links leading to 404 errors despite following the documentation?

February 5, 2025 at 11:03 am #16670457

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

February 6, 2025 at 9:20 am #16674189

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. I think this issue happens because the "Offers (moff_post_offerta)" and "Offers (moff_cat_offerta)" slugs are identical in all languages.

I suggest changing the post type slug in the default language along with its translation and check the issue.

Best regards,
Osama

February 6, 2025 at 10:04 am #16674590

mattiaO

Hi,

thank you for your reply. Where exactly should I look? I translated moff_cat_offer and moff_post_offer in WPML --> Settings but the problem remains. I attach screenshots.

Istantanea_2025-02-06_10-59-28.png
Istantanea_2025-02-06_11-00-05.png
February 6, 2025 at 10:27 am #16674716

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please let me know how this CPT is created. If it's created using custom code, please edit your code and change the slug.

After that, please go to WPML-> Settings and translate the new slug with different translations than the "moff_cat_offerta" slug's translation.

Best regards,
Osama

February 6, 2025 at 9:17 pm #16677372

mattiaO

Hi,

I did what you requested but did not solve it. Please feel free to make any changes you want on this installation.

Thank you

February 7, 2025 at 1:11 am #16677665

mattiaO

Although I am sure I have tried this several times, the solution trivially was to change the slug translation in WPML --> Settings --> Post Types Translation to something else and then update the permalinks in Settings --> Permalinks

I'm really disappointed that I wasted 2 days on such nonsense and wasted your time too!

Thanks for the help!