term_description( int $term, null $deprecated = null )
Retrieve term description.
Description Description
Parameters Parameters
- $term
-
(int) (Optional) Term ID. Will use global term ID by default.
- $deprecated
-
(null) (Optional) Deprecated argument.
Default value: null
Return Return
(string) Term description, available.
Source Source
File: wp-includes/category-template.php
function term_description( $term = 0, $deprecated = null ) { if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) { $term = get_queried_object(); if ( $term ) { $term = $term->term_id; } } $description = get_term_field( 'description', $term ); return is_wp_error( $description ) ? '' : $description; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
4.9.2 | The $taxonomy parameter was deprecated. |
2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
The default usage returns the description of the current queried term.
Displays a description of the post tag ID 28.