WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/tag description

Contents

Description

First available with WordPress Version 2.8, this template tag returns the description of a tag. A tag ID can be passed as a parameter, but if no tag ID is passed, the description current queried tag will be returned.

Usage

 <?php tag_description$tag_id ); ?> 

Default Usage

The default usage returns the description of the current queried tag.

<?php $description = tag_description(); ?>

Parameters

$tag_id
(integer) (optional) The ID of the tag to return a description.
Default: Description of current query tag.

Return Values

(string) 
Tag description, available.

Example

Displays a description of the tag id 28.  <?php echo 'Tag Description: ' tag_description('28'); ?> 

Change Log

Notes

Source File

tag_description() is located in wp-includes/category-template.php.

Related

Tags: get_tag(), get_tag_link(), get_tags(), get_the_tag_list(), get_the_tags(), is_tag(), the_tags(), single_tag_title(), tag_description(), wp_generate_tag_cloud(), wp_tag_cloud()

See also index of Function Reference and index of Template Tags.