Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - -
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - -

Supporter timezone: Asia/Yerevan (GMT+04:00)

This topic contains 3 replies, has 0 voices.

Last updated by Christopher Amirian 11 months ago.

Assisted by: Christopher Amirian.

Author Posts
June 10, 2025 at 6:09 pm #17123243

telmoS

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?

June 11, 2025 at 7:30 am #17124234

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support.

I tried to check the links in question and they both (EN and FR) go to 404 page.

Would you please test if the issue is happening even when WPML and WPML addons are deactivated?

Thanks.

Screenshot 2025-06-11 at 11.28.17 AM.png
Screenshot 2025-06-11 at 11.28.14 AM.png
June 11, 2025 at 7:34 am #17124284

telmoS

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.

June 11, 2025 at 9:51 am #17124837

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Ok sure, if you manage to bring back the custom post, please inform me to check as I still cannot see the post:

hidden link.

Thanks.

The topic ‘[Closed] Language switcher on custom post archive page not detecting alternate languages’ is closed to new replies.