Good evening folks,
For the needs of my portfolio, I’ve built a set of custom fields that only display for attachments. Those fields are like filename, reference, version_name, description, category, rating, city, state_province, country, copyright, date_of_shooting, max_available_width, max_available_height
.
As you can see read, I’ve a category field, which is set in ACF as a Taxonomy.
Since I’m updating from my old code, I’ve hundreds of attachments I need to update (I’ve done previous posts about this here). Thanks to James and John, I’ve been able to manage how to use update_field($fieldKey, $value, $attachmentID);
(among others) and it’s working perfectly for everything but the Taxonomy.
I don’t know how to prepare my $value
to make it work.
My actual imported format is like so 'category' => 'Wildlife,Urban'
I’ve already created all the needed taxonomies as categories in WordPress, those are a subcategory from the category “Portfolio”.
Note these categories also exist as translated, using WPML.
Thanks in advance for you help.