Codex

Template Tags/category description

Contents

Description

Returns the description of a category.

Usage

 <?php echo category_description($category); ?> 

Examples

Default Usage

Displays the description of a category, given it's id, by echoing the return value of the tag. If no category given and used on a category page, it returns the description of the current category.

 <p><?php echo category_description(3); ?></p> 

Result:

WordPress is a favorite blogging tool of mine and I share tips and tricks for using WordPress here.

With Category Title

 <p><strong><?php single_cat_title('Currently browsing'); ?>
</strong>: <?php echo category_description(); ?></p> 

Result:

Currently browsing WordPress: WordPress is a favorite blogging tool of mine and I share tips and tricks for using WordPress here.

Parameters

category 
(integer) The numeric ID of the category for which the tag is to return the description. Defaults to the current category, if one is not set.

Related

the_category, the_category_rss, single_cat_title, category_description, wp_dropdown_categories, wp_list_categories, in_category, get_category_parents, get_the_category get_category_link,

How to pass parameters to tags

Go to Template Tag index