Home Forums Backend Issues (wp-admin) Update field taxonomy Reply To: Update field taxonomy

  • hi @signelazer

    If you’re setting it on a custom post type, you’ll need to use this function wp_set_object_terms instead.

    Also, term_exists sends back the ID, so you don’t need to do $term_id->term_id, just $term_id would work as found here:

    I found this by searching “wp_set_post_terms not working” and it was in the top 3 links (at least for my results). When trying to debug a situation, try searching for what’s wrong and you’ll find that usually a lot of other people have struggled with the same issue.

    Here’s some a resource (provided by ACF) for debugging:

    Let us know if this helps or if the problem persists!