jamesI-2
We are using WordPress with ACF Pro and WPML.
We have an ACF Relationship field named:
posts_to_display_in_grid
The field allows multiple post types (not fixed to a single CPT)
The related post types (e.g. People, Stories, etc.) are translatable
The field translation preference in WPML is set to Copy
Default language: English
Secondary language: French
Expected Behavior
The relationship field order should be managed from English (default language)
The same order should appear:
in the French backend
on the French frontend
French translations should inherit the English relationship field values when set to Copy
Actual Behavior
When the relationship order is changed and saved in English:
The order is correctly updated
The updated order is reflected in French backend
When attempting to reorder or remove items in French and clicking Update:
The changes do not persist
The relationship field reverts back to the English order after save
On the frontend (French):
Looping directly over the ACF Relationship field does not preserve order
Order differs from what is selected in the backend
jamesI-2
HI
message show below but I can't see code there. Can you please provide me a code please
To properly display the related posts with their preserved order, your theme's code should look something like this (this is a general practice for ACF Relationship fields)
Thanks
Itamar
WPML Supporter since 02/2016
Languages:
Hebrew (עברית )
Timezone:
Asia/Jerusalem (GMT+03:00)
Hi,
For some unknown reason, you opened a few tickets with the same issue. Please check the following ticket where I provided the solution.
https://wpml.org/forums/topic/acf-relationship-field-order-not-persisting-in-translated-language-wpml-acf-pro-5/
Best Regards,
Itamar.