Sauter la navigation

Resolved

Reported for: CMS multilingue de WPML 4.6.0

Topic Tags: Bug

Overview of the issue

When you include categories in the URLs of your posts (e.g. /%category%/%postname%/) or WooCommerce product (e.g. /shop/%product_cat%/), the translated URL includes different categories or a different order if multiple categories are assigned.

When a post or product is assigned multiple categories, each category is assigned a unique ID that is used in the permalink. However, the order in which these categories are translated may differ from the original order, causing the IDs to not match up properly.

This issue is not specific to WPML, but rather a potential area for improvement in WordPress. We have reported this issue to WordPress and WooCommerce.

Workaround

The current workaround for this issue is to translate the categories in the same order they were created, which will preserve the original order of category IDs.

If you have already translated the categories in a different order, you can delete the original category and its translation, and then re-translate them in the correct order.