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:

Description

Adds term(s) associated with a given object.

Related Functions

wp_get_object_terms, wp_set_object_terms, wp_remove_object_terms, add_object_page, wp_add_post_tags

Top Google Results

User discussions

wpseek mobile