Adds term(s) associated with a given object.
$object_idintrequired
$termsstring|int|arrayrequired
$taxonomyarray|stringrequired
function wp_add_object_terms( $object_id, $terms, $taxonomy ) {
return wp_set_object_terms( $object_id, $terms, $taxonomy, true );
}
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_add_object_terms