Support

Account

Home Forums Backend Issues (wp-admin) Linking ACF Taxonomy to WP Taxonomy on programmatic save/insert Reply To: Linking ACF Taxonomy to WP Taxonomy on programmatic save/insert

  • I don’t think there is a function you can call to do this. When you set the save/load terms options for a taxonomy field ACF calls WP functions with the right info to make this happen.

    When saving the field ACF calls wp_set_object_terms() https://codex.wordpress.org/Function_Reference/wp_set_object_terms

    When loading the field ACF calls wp_get_object_terms() https://codex.wordpress.org/Function_Reference/wp_get_object_terms

    You can get more information about what ACF is doing by looking at the file for the taxonomy field /advanced-custom-fields-pro/includes/fields/class-acf-field-taxonomy.php.

    I think that in order to do what you want that you’ll need to call these WP functions yourself.