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

Glossary Term

get_term_field()

3 tags 1 category

get_term_field() — Gets sanitized term field. The function is for contextual reasons and for simplicity of usage.

Inputs: $field (string): Term field to fetch. $term (int|WP_Term): Term ID or object. $taxonomy (string): Optional. Taxonomy name. Default empty. $context (string): Optional. How to sanitize term fields. Look at sanitize_term_field() for available options. Default ‘display’.

Returns string|int|null|WP_Error: Will return an empty string if $term is not an object or if $field is not set in $term.

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…