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.
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?
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?
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?
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
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.
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
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.