Skip Navigation

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

Last updated by Bruno 4 years, 11 months ago.

Assigned support staff: Bruno.

Author Posts
October 24, 2016 at 10:20 am #1121520

lucaP-26

Hi,

I have a post type (created through CPT UI plugin). This post type has "has_archive" true and I set a CUSTOM post type archive link.

To explain:
my IT slug post type is "evento"
my EN slug post type is "event".
The IT archive post type slug is "eventi-e-contest".
I have to set the EN archive post type slug to "events-and-contest". Can I translate a custom post type archive link?

I read an article of 2015 on wpml support that WPML doesn't support custom post type archive slug. Is that fixed? Can I translate it?

And I have another problem with "wpml_permalink":
I have:
my IT slug post type is "accessori"
I translated the EN slug post type in "accessories".
The IT archive post type slug is "www.MYDOMAIN.com/accessori".
The EN archive post type slug is "www.MYDOMAIN.com/en/accessories" and it works well.
But if I call "wpml_permalink" to the IT archive post type slug, it doesn't retrieve the correct translated EN slug. It retrieves "www.MYDOMAIN.com/en/accessori" than "www.MYDOMAIN.com/en/accessories"

Thanks,
Luca

October 24, 2016 at 6:45 pm #1121971

Bruno

Thank you for contacting us.

No. At this time it is not possible to translate the has_archive string. Our developers are aware of this.

You can see in our documentation: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/

About your second question, with "wpml_permalink" hook, this is the same problem mentioned above. The slug of the has_archive does not translate. So returns the slug original language.

Please note that we do not have a workaround for this at this moment.

Please let me know if I can help with any other questions you may have.

Thank you.