This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is using Elementor and WooCommerce to display carousels with links to product attributes (brands) that are set to 'not translatable'. The links should link to the current language version, but WPML is altering them to the default language. The client wants these specific links to remain unchanged in the translated pages.
Solution:
We recommended adding a custom filter to the theme's functions.php file to prevent WPML from altering these specific links. Here is the code snippet to add:
add_filter('wpml_sl_blacklist_requests', 'wpml_sl_blacklist_requests', 10, 2);<br />function wpml_sl_blacklist_requests($blacklist, $sitepress) {<br /> $blacklist[] = 'brand/nike-sb';<br /> return $blacklist;<br />}
This code will add the specified brand to a blacklist, preventing WPML from translating the URL. For more information on managing sticky links in WPML, visit WPML Sticky Links documentation.
If this solution does not apply to your case, or if it seems outdated, we 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. If issues persist, please open a new support ticket.
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.
This topic contains 0 reply, has 1 voice.
Last updated by 3 months, 2 weeks ago.
Assisted by: Dražen.