Retrieves metadata for a term.
Parameters
$term_idintrequired- Term ID.
$keystringoptional- The meta key to retrieve. By default, returns data for all keys.
Default:
'' $singlebooloptional- Whether to return a single value.
This parameter has no effect if$keyis 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