Skip Navigation

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

Problem:
The client was experiencing an issue where the URLs for pages like the cart and shop in Arabic were changing to 'cart-2' and 'shop-2', despite adding a language prefix '/ar/' to the URLs.
Solution:
We explained that this is expected behavior in WordPress when a page slug is auto-generated and another page with the same slug already exists, resulting in the second page having a '-2' suffix. To resolve this, we suggested two options:
1. Manually edit the page in Arabic, change the slug, and save the changes.
2. Use the Advanced Translation Editor to translate the page slug. We provided a link to the documentation for further guidance: Translating page slugs.

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also highly suggest 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.

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 1 reply, has 2 voices.

Last updated by Long Nguyen 9 months, 2 weeks ago.

Assisted by: Long Nguyen.

Author Posts
February 20, 2024 at 2:55 am #15320441

itsFarouk

Hi,

4- why the URL are changing, like cart page in Arabic the URL is cart-2, and shop page in Arabic are shop-2, since we are adding a prefix in the URL /ar/ so why the URLs are changing and how to keep them as they are.

Thank you

February 20, 2024 at 3:00 am #15320442

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

It is an expected behavior of WordPress if the page slug is auto-generated and there is another page that has the same slug. The second one will have the suffix -2 in the slug.

You can edit the page in Arabic > Change slug and save. Please check screenshot attached.

Or you can follow the documentation below to translate the page slug in Advanced Translation Editor https://wpml.org/documentation/getting-started-guide/translating-page-slugs/#sending-post-or-page-slugs-to-translators

Look forward to your reply.
Thanks

2024-02-20 09-53-34.png
February 20, 2024 at 9:32 am #15321316

itsFarouk

ok thank I will do that.