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.

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

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 1 replies, has 2 voices.

Last updated by Kor 8 months, 2 weeks ago.

Assisted by: Kor.

Author Posts
October 8, 2024 at 1:55 pm

zahiG

Background of the issue:
I replace the rules for generating links to the post page with code in functions.php. When switching languages, it returns a 404 error, since the language prefix is not added to the new link, i.e. the link remains the same.

Symptoms:
When switching to the Spanish version of the site, it gives an error and the link should include the language prefix.

Questions:
How can I fix the issue of the language prefix not being added to the new link?

October 8, 2024 at 2:32 pm
October 8, 2024 at 2:33 pm #16265986

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

Here is the ticket and please let me know how it goes.

The topic ‘[Closed] URL formation when switching languages’ is closed to new replies.