Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

is_object_in_term()

3 tags 1 category

is_object_in_term() — Determines if the given object is associated with any of the given terms. The given terms are checked against the object’s terms’ term_ids, names and slugs. Terms given as integers will only be checked against the object’s terms’ term_ids. If no terms are given, determines if object is associated with any terms in the given taxonomy.

Inputs: $object_id (int): ID of the object (post ID, link ID, …). $taxonomy (string): Single taxonomy name. $terms (int|string|int[]|string[]): Optional. Term ID, name, slug, or array of such to check against. Default null.

Returns bool|WP_Error: WP_Error on input error.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…