Home › Forums › Bug Reports › wp_insert_post && update_field › Reply To: wp_insert_post && update_field
Hi John, The update_field documentation does not address ACF taxonomy field types. I have used the update_field() call with using the ACF taxonomy field key, but I still need to click the Update button through the admin UI in order to link the ACF taxonomy field value to the WP taxonomy value. Could you please provide a code example for taxonomy values.
$dl_ploidy = ‘field_586131d916252’;
$dl_ploidy_value = $seedlingploidy;
update_field($dl_ploidy, $dl_ploidy_value, $post_id);
using the code above, the value is saved to the correct field, and is viewable through the admin interface, but not on front end output that displays the corresponding wp taxonomy value. Once I click update on the admin post screen, the value is displayed in the front end output. Also, if I follow this call with wp_set_post terms, or wp_set_object_terms, I get the same behavior. An example would be really great. Thanks!
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!
🎉ACF has made it into the latest round of the @TheTorqueMag Plugin Madness!
— Advanced Custom Fields (@wp_acf) March 22, 2023
🙏 Please swing by and vote for ACF in the latest matchup.
🙌 Each round lasts one week, but you can vote twice each week. Make sure to get both your votes in!https://t.co/iTpRE82O1k
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.