Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client has a static home page with a custom plugin that creates a URL structure for different languages. After installing WPML and setting 'fr-fr' as a custom language, there is a permalink error for the French-language homepage. The expected URL is

https://mysite.com/news/fr-fr/fr-fr

, but WPML generates

https://mysite.com/news/fr-fr/

.
Solution:
We recommend not altering the URL structure that WPML generates, as it is designed to add the language directory after the SiteURL. Interference from custom plugins can cause unexpected behavior. If the client requires a custom solution to maintain the previous URL structure, we advise contacting a certified developer who can assist with this specific need. Developers can be found at https://wpml.org/contractors/.

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.

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by Marcel 11 months, 1 week ago.

Assisted by: Marcel.

Author Posts
January 19, 2024 at 10:05 am #15203938

seemaD

We have a static home page with the URL (hidden link), and we have set this as a front page from the WordPress dashboard settings>reading>static page.

Also, we have a custom plugin for the translation, which makes the URL for the homepage in a different language, e.g., hidden link.

Now that we have added the WPML plugin, we have fr-fr as a custom language, which creates an error for the permalink of our existing French-language homepage.

URL weare getting hidden link but this supposed to have hidden link as we had before. 

Could you please help on this.

January 19, 2024 at 6:53 pm #15206163

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

This request is related to your custom plugin and it intervenes with the way how WPML works.

The behavior you are experiencing is expected, as WPML will add the language directory behind the SiteURL.

We do not suggest altering this behavior with a custom plugin.

Best regards
Andreas

January 22, 2024 at 10:33 am #15210432

seemaD

It would be helpful if we could do it, as we already have over 17K posts and pages and all the URL breaks after installing WPML. We have tried to modify 'home_url', '_get_page_link', etc. hooks, but they are not working. Please help.

January 23, 2024 at 8:55 am #15214781

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+01:00)

Hi,

as my colleague Andreas is unavailable today, I'm taking over your ticket.

Please note that we can't help you with problems caused by 3rd party plugins that modify how WPML is designed to work. You should get in touch with a certified developer who can develop a custom solution for your requirement. You can find them here: https://wpml.org/contractors/

Best Regards
Marcel