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 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 8:00 – 12:00 | 8:00 – 12:00 | - |
- | 14:00 – 17:00 | 14:00 – 18:00 | 14:00 – 18:00 | 13:00 – 17:00 | 13:00 – 17:00 | - |
Supporter timezone: Europe/Zagreb (GMT+01:00)
Tagged: Documentation request
This topic contains 2 replies, has 0 voices.
Last updated by Bruno Kos 9 hours, 9 minutes ago.
Assisted by: Bruno Kos.
Author | Posts |
---|---|
November 27, 2024 at 7:24 am #16447629 | |
dorM |
Background of the issue: Symptoms: Questions: |
November 27, 2024 at 8:50 am #16448095 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Hi, Thank you for contacting WPML support! Did you check this? If so, can you tell me what did you try and after which step does it still fail? Regards, |
November 27, 2024 at 9:16 am #16448225 | |
dorM |
yes, i tried both ways - |
November 27, 2024 at 2:53 pm #16450680 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Would you be willing to provide me with WordPress credentials so I could investigate the issue directly? Also send me the URL where this occurs. I marked your next reply as private so that you can safely add credentials. |
November 29, 2024 at 7:29 am #16457869 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
So, the dropdown translation works, but it doesn't function correctly within the modal? Could you clarify where the modal is being generated? It seems the modal isn't properly filtering these values. This could either be due to missing code specific to the modal (if it's only pulling ACF fields) or a compatibility issue with the plugin managing the modal. |
December 1, 2024 at 8:56 am #16462662 | |
dorM |
no its not in the filter. |
December 2, 2024 at 8:39 am #16464572 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
I see, but the code that creates the popup itself and then pulls these custom fields, where is this coded? Is it your custom code or part of the Bakery elements/custom widgets? |
December 2, 2024 at 1:36 pm #16466309 | |
dorM |
its custom coded. |
December 2, 2024 at 3:45 pm #16467361 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Can you tell where in the theme code or plugin code can we find the code reponsible for it? Perhaps it is where WPML filters are missing that would filter the content based on the language. |
December 2, 2024 at 4:07 pm #16467446 | |
dorM |
yes of course but you can see in the edit screen in the english version that the values are not shown as translated at all. anyways, this is the code responsible for showing it on frontend: take a look in the products() function |
December 3, 2024 at 6:24 am #16469446 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
Can you please try the following: Update the `products()` function in the `page-our-products.php` file by replacing the current implementation of `get_field('dough', $product->ID)` with the following code: $current_language = apply_filters('wpml_current_language', null); $translated_product_id = apply_filters('wpml_object_id', $product->ID, 'product', true, $current_language); $dough = get_field('dough', $translated_product_id); Does it work? |
December 3, 2024 at 7:21 am #16469613 | |
dorM |
hi, thank you. implemented it like this: return [ ------- |
December 3, 2024 at 10:52 am #16471056 | |
Bruno Kos Supporter
Languages: English (English ) German (Deutsch ) French (Français ) Timezone: Europe/Zagreb (GMT+01:00) |
In the ACF Field Group settings for the dough field, can you try changing the return format to "Label" instead of "Value"? Currently, it is configured to return the value, which means the get_field call is retrieving the value, not the label. Labels in choice fields, like Select fields, are translatable, whereas values are not. |