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!