Skip Navigation

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

Problem:
The client wants to change the URL structure to include the category slug, but only for the Norwegian language on their multilingual site. They are using WPML and currently have a different structure for Danish.
Solution:
We have determined that it is not possible to have different URL structures for each language when using WPML, as the content needs to be linked properly across languages. Additionally, attempting to force this change through code modifications is likely to cause issues and is not recommended.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we encourage you to open a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at https://wpml.org/forums/.

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 0 replies, has 0 voices.

Last updated by jeppeS-3 5 days, 6 hours ago.

Assisted by: Ilyes.

Author Posts
November 15, 2024 at 12:11 pm #16408200

jeppeS-3

Background of the issue:
I have Danish and Norwegian languages on my site. I want to change the URL when viewing a product to include the category slug, but only for Norwegian.
Currently, for Danish, it is shopdomain.dk/vare/%product%
and for Norwegian, I want it to be shopdomain.dk/%category%/%product%

Symptoms:
I can't find any documentation regarding changing the URL structure for only one language.

Questions:
How can I change the URL structure to include the category slug only for the Norwegian language using WPML?

November 16, 2024 at 2:09 am #16410147

Ilyes
Supporter

Languages: English (English ) French (Français )

Timezone: Pacific/Easter (GMT-05:00)

Hello again,

I'm afraid this won't be possible with WPML as the URL structure has to be the same between languages for content to be linked properly,

Also, tweaking the code to force this change is prone to issues, I wouldn't recommend it.

Best,

November 19, 2024 at 7:28 am #16417832

jeppeS-3

Thank you for looking into it Ilyes 😊