wp_add_object_terms
wp_add_object_terms ( $object_id, $terms, $taxonomy )
Parameters:- (int) object_id The ID of the object to which the terms will be added.
- (string|int|array) terms The slug(s) or ID(s) of the term(s) to add.
- (array|string) taxonomy Taxonomy name.
Returns:- (array|WP_Error) Term taxonomy IDs of the affected terms.
Defined at: - Introduced in WordPress: 3.6.0
- Deprecated in WordPress: —
Description
Adds term(s) associated with a given object.