Background of the issue:
I have created a custom post type called 'guide'. The slug for Guides is hidden link in English, which is the primary language, and in French, it is called /fr/apprendre. I am trying to ensure that the language switcher on the custom post archive page detects alternate languages correctly. The issue can be seen at hidden link.
Symptoms:
When accessing the English page, the archive page and the language switcher display the correct slugs. However, when switching to French, the language switcher no longer has the correct slugs and instead shows the home page. Other custom post types work properly.
Questions:
Why does the language switcher not display the correct slugs when switching to French?
How can I ensure the language switcher shows the correct custom post type slugs in French?
Apologies. I deleted the CPT to start from scratch to determine whats going on. If I disable WPML then I will definitely not be able to test the issue as Lang Switcher, etc. will not exist or not work as required. I am getting some external support to see if we can solve this.