get_term_field


get_term_field ( $field, $term, $taxonomy = '', $context = 'display' )

Parameters:
  • (string) $field Term field to fetch.
  • (int|WP_Term) $term Term ID or object.
  • (string) $taxonomy Optional. Taxonomy Name. Default empty.
  • (string) $context Optional, default is display. Look at sanitize_term_field() for available options.
See:
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.
Defined at:
Change Log:
  • 4: .

Description

Get sanitized Term field.

The function is for contextual reasons and for simplicity of usage.

Related Functions

get_post_field, get_term_children, get_term_feed_link, _get_term_children, get_the_id

Top Google Results

User discussions

wpseek mobile