Support

Account

Home Forums Bug Reports acf/save_post – wrong taxonomy field value Reply To: acf/save_post – wrong taxonomy field value

  • Saving the taxonomy terms means calling wp_set_post_terms(), see the documentation. https://codex.wordpress.org/Function_Reference/wp_set_post_terms

    Loading the taxonomy terms means calling wp_get_post_terms(), https://codex.wordpress.org/Function_Reference/wp_get_post_terms

    Load terms means that the values added using wp_set_post_terms() are retrieved. Turning off load terms means that the values from the ACF field are retrieved. If the terms are not updated then you will always get the same values back. With a taxonomy the values are saved into the acf field. Since you have load terms turned on then no, ACF does not get the values you saved in the field and every time you call get_field() ACF will get the values using wp_get_post_terms() and will ignore whatever is in the ACF field, no matter where you call it from or when you call it.

    I suppose that this can be a little confusing, but if you turn on load terms then whatever is in the ACF field is meaningless.

    If you want to get the values in this field and not the terms set using wp_set_post_terms() then I suggest that you use get_post_meta() to get the values that are in the ACF field.