wp_add_object_terms cant recognize a post ID

With: wp_add_object_terms( $cpt_dates_post_ID, intval($manifestation_insert_id), ‘cpt_dates_postID’); You’re actually saying “Add a cpt_dates_postID term with ID intval($manifestation_insert_id) to the CPT with ID $cpt_dates_post_ID“. That won’t work, because intval($manifestation_insert_id) is the ID of: another post (from another CPT, freshly inserted with […] Not the ID of an existing $cpt_dates_post_ID term entry. The reason why these 2 work: wp_add_object_terms( … Read more