Used versions: WPML 4.5.11, ACF Pro 6.0.0, WordPress 6.0.2, Advanced Custom Fields Multilingual 1.10.4
When I use the WPML standard or advanced translation editor, WPML creates only one entry for the field name in wp_postmeta like this:
meta_key = ‘my_field_name’, meta_value = ‘the value’
Unfortunately this means that the ACF get_fields() function cannot return any fields. get_fields() requires an additional entry in the wp_postmeta for each field connecting the field key and the field name:
meta_key = ‘_my_field_name’, meta_value = ‘field_my_field_key’
If I then manually edit the translated post and save it again, these missing entries are generated by ACF and the get_fields() function works correctly.
Is there any way to generate these meta data per ACF function call? I have helped myself so far by writing each field again with update_field, but this costs unnecessary time.
And is this misbehavior of WPML actually known? Is there a solution?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.