Hello,
I have a site with a lot of posts and custom taxonomies associeted to them.
Now, for many reasons I need these taxonomies to be stored as custom fields.
ACF works great for this (and also keep custom fields and taxonomies synchronized). But the problem is that until the post is not opened and updated, the custom fields are empty…
Now, I can’t open and update hundreds of posts… How can I bulk populate the custom fields?
Thanks for support and the great plugin!
Hi @kharlo,
Have you searched to see if someone in the ACF community has created a plugin to solve this issue?
If not, that is probably the best way to get it done. One that iterates over each of your posts and syncs the taxonomies to fields.
Not really… Where do I have to search?.. In the forum I don’t find anything
Hi @kharlo
I would highly encourage you to not duplicate your data by having both taxonomy and custom field saving the save data.
This ‘saving all the posts’ issue is only one of many synchronized issues you will experience with this data structure.
If you are adamant about this method, you can write a custom loop using WP_Query
and for each post, use the update_field
function to save the taxonomy term ID’s as an array.
Thanks
E