Background of the issue:
I am trying to translate a custom post type (CPT) 'author' into Croatian using WPML with the 'Translatable (use translation if available or fallback to default language)' option. The original slug is 'author', and I'm translating it to 'autor'. The CPT is registered with a plugin, and here is the code for that: hidden link. I am using WPML plugins and the Twenty Twenty-One theme with no modifications. I have another ticket open which is not related to this: https://wpml.org/forums/topic/translate-cpt-slug/. The issue can be seen here: hidden link
Symptoms:
The permalink for the Croatian version of the post is 'hidden link' instead of 'hidden link'. The word 'author' is not translated to 'autor', although the language switcher in the footer uses the correct link.
Questions:
Why is the slug 'author' not translating to 'autor' in the permalink?
How can I ensure the translated slug appears correctly in the permalink?
I've reviewed the report status, and I can confirm it’s on our dev team’s to-do list. Unfortunately, I don’t have any updates or workarounds at this time, but I’ll definitely get back to you as soon as I have feedback.
We have a solution and this is how it works now hidden link . You'll notice that the permalink for the Croatian version of the post is now using hidden link
To fix this, navigate to wpml-string-translation/classes/slug-translation/class-wpml-slug-translation.php line 129
Hey Kor. Thank you for the fix. I can confirm it's working. Do you know when will the change go in to WPML String Translation? I'm asking just so we know so if the next version doesn't have the fix it that we add it back in after we update the plugin.
It's waiting for devs review and there is no ETA yet. I will keep you updated.
The topic ‘[Closed] Permalinks on archive’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.