Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to automatically copy an ACF field value from a taxonomy in the default language to other language versions but is unsure if there is a WPML setting or function available for this.
Solution:
We recommend using the ACFML addon and setting the ACF field to 'COPY' translation settings. This can be done by following the documentation on translating sites built with ACF, available here:
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/
https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/
After setting the field to COPY, save or update the default language taxonomy to trigger the copying of values to translated taxonomies. This process needs to be manually triggered by saving or updating the taxonomy in the default language.

Please note that this solution might be outdated or not applicable to your specific case. If this does not resolve your issue, 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 further assistance is needed, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 7 replies, has 1 voice.

Last updated by ericH-23 1 day, 7 hours ago.

Assisted by: Dražen.

Author Posts
January 20, 2025 at 9:41 pm #16615649

ericH-23

Background of the issue:
I have added an ACF field to the taxonomy Jobmanager category and added a value in EN. I want to automatically copy this value into the other language versions of this taxonomy field.

Symptoms:
I am unsure if there is a WPML setting or function available to automatically copy the ACF field value to other language versions.

Questions:
How can I automatically copy the ACF field value of the Jobmanager category to other language versions?
Is there a WPML setting or function available for this task?

January 21, 2025 at 8:58 am #16616846

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

I would advise checking our related documentation, you should be using ACFML addon and then setting that field to COPY translation settings:

- https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/
- https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

Saving/updating default language should then copy same value to translated taxonomy.

Regards,
Drazen

January 21, 2025 at 12:16 pm #16618341

ericH-23

Hi,
Thanks, I understand it so far.

I think the normal way is here to add an ACF field to a post.

But I am adding it to a taxonomy.

And a taxonomy field is only copied, if it is connected to a post, which is then translated/duplicated (names/slug).

(ACF field content I got yesterday only into the other languages, after deleting the taxonomy and to add the whole taxonomies to a post and translate the post. Without deleting the taxonomy the fields weren't updated.)

So in my tests a ACF taxonomy field is not copied.

Is here a further / special setting / function code / hook available?

So I mean: adding a value in an acf field in the category (taxonomie) list in EN and automatically adding it (or the translations) into the same field in other languages?

Thanks, kind regards
Eric

January 22, 2025 at 7:14 am #16621266

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Eric,

it does not matter where the field is set, as I have said if it is set to COPY it should copy when you update/save the default language. It can not be done automatically you need to trigger and save the default language taxonomy.

1)  In order to expedite handling your support requests, can you please share WPML support debug information from your site.

- To give debug information, login to your site and go to WPML → Support. From there click on the “debug information” link at the bottom of the page.
- Once on the “debug information” page, select the entire content of the text box and copy it.
- Now go back to our support forum, find debug information box and paste it.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2) Can you please share an image of the translation settings of this field and video of you trying this suggestion and it does not work?

Thanks,
Drazen

January 22, 2025 at 8:04 am #16621355

ericH-23

Hi,
I made this test:
- I have a code for duplicating jobs in my system, works good
- I have a taxonomy with ACF field
- I added a taxonomy with a value in a ACF field to a job in EN
- after the duplication of the job the taxonomy value is not copied to the other language (taxonomy view in the backend)
Also at the beginning I added the ACF field to the taxonomy and this column was only shown at the standard language, so I connected all taxonomy options to a job and translated the job in the backend. The ACF column was not shown in other languages. First I had to delete the whole taxonomy entries in one language, then it was copied new and with the ACF field.
Is this like it should be?

And to your sentence "It can not be done automatically you need to trigger and save the default language taxonomy.": is the copying of the job with the connected taxonomy the trigger or must this be done extra?
I have added the debug info and wait on your answer.
Thanks, kind regards
Eric

January 22, 2025 at 8:09 am #16621389

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Eric,

as I have said that is not how it works, transleting / copying posts will not copy-translate the taxonomy field.

You need to create a taxonomy in the default language and make sure that extra field is set to copy from ACF and ACML is used. Then translate the taxonomy from WPML > Taxonomy translation or manually same way you did in default, then the copy will trigger and be copied also to translation, anything else will not work.

You need to do this for each existing taxonomy term, go over them in the default language and save/update, and if the translation exists field will be copied.

Regards,
Drazen

January 22, 2025 at 8:26 am #16621424

ericH-23

Hi,
Thanks, ok.
So is here a code / hook available, that copies the taxonomy with copying the job?
I could create a code then, or will try another approach for my needs.
Thanks for the quick answer!
Eric

January 22, 2025 at 12:15 pm #16622747

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello Eric,

taxonomies should be translated, so when you translate job same translated taxonomy will be applied. You can not copy taxonomy, they need to be translated before or with current post /job.

If you mean on taxonomy custom field copy with job translation, I am afraid not, since taxonomy is one and translating post another thing. The best I can suggest is bulk update/save (code) default language taxonomies after translating them and that should copy custom field also.

Regards,
Drazen

January 22, 2025 at 12:16 pm #16622779

ericH-23

Hi, OK, I understand.
Kind regards
Eric