Retrieves metadata for a term.
Parameters
$term_id
intrequired- Term ID.
$key
stringoptional- The meta key to retrieve. By default, returns data for all keys.
Default:
''
$single
booloptional- Whether to return a single value.
This parameter has no effect if$key
is not specified.
Default:
false
Source
function get_term_meta( $term_id, $key = '', $single = false ) {
return get_metadata( 'term', $term_id, $key, $single );
}
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes