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

Glossary Term

get_objects_in_term()

3 tags 1 category

get_objects_in_term() — Retrieves object IDs of valid taxonomy and term. The strings of $taxonomies must exist before this function will continue. On failure of finding a valid taxonomy, it will return a WP_Error. The $terms aren’t checked the same as $taxonomies, but still need to exist for object IDs to be returned. It is possible to change the order that object IDs are returned by using $args with either ASC or DESC array. The value should be in the key named ‘order’.

Inputs: $term_ids (int|int[]): Term ID or array of term IDs of terms that will be used. $taxonomies (string|string[]): String of taxonomy name or Array of string values of taxonomy names. $args (array|string): Change the order of the object IDs. Field $order (string): Order to retrieve terms. Accepts ‘ASC’ or ‘DESC’. Default ‘ASC’.

Returns string[]|WP_Error: An array of object IDs as numeric strings on success, WP_Error if the taxonomy does not exist.

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…