Yes, wp_insert_term()
only creates the term. To assign the term to a post use wp_set_object_terms()
wp_set_object_terms( $object_id, $terms, $taxonomy, $append );
Yes, wp_insert_term()
only creates the term. To assign the term to a post use wp_set_object_terms()
wp_set_object_terms( $object_id, $terms, $taxonomy, $append );