Can not display translated version of CPTs
-
Hello!
I’ve created a custom post type as ‘products’ and now I would like to create a translated version for any of these posts, using polylang’s plugin. The problem is when I try to open the translated version, this won’t be shown. So, for example, the main custom post works fine and I can visit https://www.site.com/post-title/ as normal, but if I try to open https://www.site.com/en/post-title/ it gives 404 error. I have no problem with pages, so the issue seems to be only on CPT.
After researching, I found out that the actual translated link needs the custom post type slug in order to work, something link https://www.site.com/en/products/post-title/, but I don’t really like this URL to be honest. Is there any chance to use the URL without the slug?
I also noticed a strange behaviour: if I add ‘en’ as Custom Rewrite Slug in products setting, the translated version of that post type actually work but not the pages anymore! I was wondering why a single CPT setting can affect to the whole website and brokes the page’s URL.
Thank you for your help.
The topic ‘Can not display translated version of CPTs’ is closed to new replies.