tag_description()
Gets the description of the tag, which is set when creating/editing the tag in the admin panel.
Uses: term_description()
No Hooks.
Returns
String. text, the description of the tag or a placeholder if there is no description or it could not be retrieved.
Usage
<?php tag_description( $tag_id ); ?>
- $tag_id(integer)
- ID of the tag whose description needs to be retrieved.
Default: ID of the tag whose page is being displayed
Examples
#1 Display the description of the tag with ID 56:
<?php echo 'Tag description: ' . tag_description( '56' ); ?>
Changelog
| Since 2.8.0 | Introduced. |
tag_description() tag description code WP 6.9.1
function tag_description( $tag = 0 ) {
return term_description( $tag );
}