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 |
---|---|---|---|---|---|---|
- | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | 12:00 – 16:00 | - |
Supporter timezone: Europe/Zagreb (GMT+01:00)
Tagged: Custom Work
This topic contains 6 replies, has 1 voice.
Last updated by Dražen 4 days, 4 hours ago.
Assisted by: Dražen.
Author | Posts |
---|---|
January 16, 2025 at 11:25 am #16601638 | |
amigosS |
Background of the issue: Symptoms: Questions: |
January 16, 2025 at 2:05 pm #16602380 | |
amigosS |
Quick addition : I stored in a var all the links separated by comas and displayed them in an html commented line before the rendered html and all of them are in the current language but the html code that is displayed has all its linked changed back to original language. WPML is 'fixing' the links using a wordpress hook somewhere. I need to prevent this action and be sure wpml doesn't change any link. |
January 21, 2025 at 8:32 am #16616730 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, thanks for contacting us. You can try to use the wpml_sl_blacklist_requests flter and then re-translate page, and it should not adjust the slugs in 2nd language: But since you are using custom code I am not sure if this will work, you can also try switching to manual translation mode and manually adjust the 2nd language links to what you need: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/ Or if nothing helps, hiring a WPML contractors to adjust your code and make it work correctly in 2nd language links also: - https://wpml.org/contractors/ I hope this helps, let me know how it goes. Regards, |
January 22, 2025 at 2:01 pm #16623493 | |
amigosS |
Hello, can you be more precise on this snippet please ? To explain in better : Your solution seems to be the one we're looking for but we don't know what to put as $blacklist[] value. Can you help us on that ? (our brands url are : site.com/brand/the-brand-slug/ About the custom code : in these same pages, we call a shortcode that lists all the brands. To avoid long query when we charge the pages (as we want to make sure brands are not empty), we have a daily cron that writes all non-empty brands in a file, then the shortcode gets the content and displays it on our website. We tried to save all the links in a var and display it, it displays all the translated links for each pages but the displayed content of the shortcode itself is re-modified by wpml to the original version of the links. I think your solution could help us on that too. Thank you |
January 22, 2025 at 2:24 pm #16623675 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, I think I misunderstood the issue, I understood you want to keep it in the default language, but you actually wish to add a translated brend URL, correct? If so, I have just tried you case and it seems to work fine in the test site, 2nd language not the translatable taxonomy URL stays the same, and WPML is not forcing the default language. - hidden link I suspect this could be an issue with your custom code or some additional plugin. Would it be possible for you to confirm this issue still happens with the default theme and only WPML plugins and Elementor? We can also try it in the slider and on a regular page with text, to check what might be causing it. Please try to reproduce the same issue in a simple example on this new test website: - hidden link Regards, |
January 22, 2025 at 6:10 pm #16624783 | |
amigosS |
Hello, sorry. The issue is concerning woocommerce products' attributes. I can't try it without woocommerce plugin. Here's how to reproduce it : The attribute has to exist before ! (I tried writing a fake link : hidden link and I can see that it outputs "correctly" (since it doesn't exists it is filtered I think but like that : hidden link). I need wpml to just not filter urls by checking if they are good or not. Let me know if you still see hidden link in the href of the translated version of the page. |
January 23, 2025 at 7:41 am #16625796 | |
Dražen Supporter
Languages: English (English ) Timezone: Europe/Zagreb (GMT+01:00) |
Hello, okay, I tried to create the Cars attribute, since there is already taxonomy Brands from Wocommerce default. But I can not get an attribute archive link to exist. This does not work even without WPML: hidden link Can you please check and try to reproduce the issue: - hidden link Regards, |