category_description() WordPress Function
The category_description() function is used to display the description for a category. The function takes one parameter, the category ID.
category_description( int $category ) #
Retrieves category description.
Parameters
- $category
(int)(Optional) Category ID. Defaults to the current category ID.
Return
(string) Category description, if available.
More Information
If used in the archive.php template, place this function within the is_category() conditional statement.
Otherwise, this function will stop the processing of the page for monthly and other archive pages.
Source
File: wp-includes/category-template.php
function category_description( $category = 0 ) { return term_description( $category ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |