Skip Navigation

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

Problem:
How to use same slugs for categories in all the languages

Solution:
This is possible to have same slug for posts/pages.
For the custom page/post to have the same slug, go to WPML=>Settings => Translated documents options=> and select "Translate (this will include the slug in the translation and not create it automatically from the title)"

but if it is a taxonomy/category/tags you can not do this.
this is how WordPress was built.
this is something should be fixed by WordPress. Not by WPML 🙂

Taxonomies can't be defined with the same slug in WordPress. If you try to create two taxonomy terms with the same slug in the same language WordPress will automatically add a numbered suffix at the end of them to make them unique.

Therefore WPML has been following that practice too. So while WordPress will add a number, WPML adds the language code to the slug.

With the actual versions you can't change to the same slugs from the WPML interface:

If you change a category slug from the WPML user interface, it will get a number (by WordPress) if you change it from the quick edit in WPML >Taxonomy translation it will get the language tag added.

But you can change it in the database if you really need it:

If you change it in the database by changing the slugs in the wp_terms table it will work correctly though. After changing the slug in the database you can also change it in the user interface of WPML > Taxonomy translation and it will keep there.

0% of people find this useful.

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

Last updated by edn-4 4 years, 9 months ago.

Assisted by: Riffaz.

Author Posts
July 2, 2019 at 9:52 am

edn-4

I am trying to edit category but getting error message hidden link if am try with default language its work fine

Link to a page where the issue can be seen:

I expected to see:

Instead, I got:

July 2, 2019 at 10:24 am #4125715

Riffaz

Hi,

Thank you for contacting WPML support.

May I ask are you using the same slug in both languages?
You have to use different slugs in different languages.

Regards,
Riffaz.

July 2, 2019 at 10:32 am #4125743

edn-4

yes am using the same slug in both languages and this is mandatory for me.
you guys need to fix this problem

July 2, 2019 at 11:38 am #4126391

Riffaz

Hi,

This is possible to have same slug for posts/pages.
For the custom page/post to have the same slug, go to WPML=>Settings => Translated documents options=> and select "Translate (this will include the slug in the translation and not create it automatically from the title)"

but if it is a taxonomy/category/tags you can not do this.
this is how WordPress was built.
this is something should be fixed by WordPress. Not by WPML 🙂

Taxonomies can't be defined with the same slug in WordPress. If you try to create two taxonomy terms with the same slug in the same language WordPress will automatically add a numbered suffix at the end of them to make them unique.

Therefore WPML has been following that practice too. So while WordPress will add a number, WPML adds the language code to the slug.

With the actual versions you can't change to the same slugs from the WPML interface:

If you change a category slug from the WPML user interface, it will get a number (by WordPress) if you change it from the quick edit in WPML >Taxonomy translation it will get the language tag added.

But you can change it in the database if you really need it:

If you change it in the database by changing the slugs in the wp_terms table it will work correctly though. After changing the slug in the database you can also change it in the user interface of WPML > Taxonomy translation and it will keep there.

Regards,

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.