The slug of this archive page enlace oculto has been changed by mistake to "autoclave-comparator" when it should be "comparador-de-autoclaves".
The problem is that I cannot find where the slug can be changed. 3 months ago I had been answered the same question (https://toolset.com/forums/topic/how-to-change-page-archive-slug/) and I had found the answer easy, whereas now I don't seem to understand it...
I hope you can help me out...
Thank you in advance

Nigel
Colaborador
Idiomas:
Inglés (English )
Español (Español )
Zona horaria:
Europe/London (GMT+00:00)
Hi there
Normally the archive URL is formed using the slug of the post type.
You can change it when registering the custom post type, and specify something else.
Go to Toolset > Post types and edit your custom post type.
Expand the Options section and update the Rewrite settings (screenshot).
The same setting will be used as the slug to display individual posts of that custom type, as well as for the archive.
Thank you very much Nigel!
That was it...
I now have a doubt though: how can I assign a different slug in other languages?
If I understand correctly, the custom archive slug cannot be translated (https://wpml.org/documentation/support/translating-slugs-for-custom-post-type-archives/), but I hope there is a way out aomehow, since I cannot leave the same spanish slugs for all the other languages...
Apparently in the String Translations it's possible to add a translation, but it doesn't seems to be working...
Is there a possible solution for this?
Thank you
Hello Maria,
Yes, it is possible to translate the CPT slug with WPML, although you want to try it in a different place rather than String Translation.
I've set up a sandbox environment and tested the steps described here and it worked for me:
https://wpml.org/documentation/getting-started-guide/translating-page-slugs/#translate-url-slugs-wpml
Can you please give it a try to see if you're able to translate that custom slug with the steps described in that article?
Thank you, please let us know.
Mateus
Hi Mateus,
thank you for your reply. I am afraid your suggestion it's not what I am looking for, as I am not trying to translate de CPT slug, but the CPT archive slug...
Is there a way to do that?
Hi Mateus,
thank you for your reply. I am afraid your suggestion it's not what I am looking for, as I am not trying to translate de CPT slug, but the CPT archive slug...
See the attached screenshots: I am not trying to translate "modelos" but "comparador-de-autoclaves"...
Is there a way to do that?
Hi,
I'm sorry for the confusion and thank you for sharing even more information.
I just double-checked with my colleagues and I'm afraid that there is a limitation in WPML where the slug of the archive can only be translatable if it's equal to the slug for single posts. Similarly to what you mentioned in one of your messages.
"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.": https://wpml.org/documentation/support/translating-slugs-for-custom-post-type-archives/
It means that in order to make the archive slug translatable, it must match the 'rewrite['slug']' or the custom post type name slug.
Regards,
Mateus