Function: wp_delete_object_term_relationships

wp_delete_object_term_relationships( integer $object_id, string | array $taxonomies )

Will unlink the object from the taxonomy or taxonomies.

Shortcut: wdotr

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Will remove all relationships between the object and any terms in a particular taxonomy or taxonomies. Does not remove the term or taxonomy itself.

Parameters

Name Type(s) Default Value Description
$object_id integer

The term Object Id that refers to the term.

$taxonomies string | array

List of Taxonomy Names or single Taxonomy name.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.