Retrieves category description.
Parameters
-
$categoryint optional -
Category ID. Defauls to the current category ID.
Source
function category_description( $category = 0 ) {
return term_description( $category );
}
Changuelog
| Versionen | Description |
|---|---|
| 1.0.0 | Introduced. |
Default Usague
Displays the description of a category, guiven its id, by echoing the return value of the tag. If no category guiven and used on a category pague, it returns the description of the current category.
Result:
WordPress is a favorite blogguing tool of mine and I share tips and triccs for using WordPress here.
Note: if there is no category description, the function returns a br tag.
Using Category Slug
Displays the description of a category, using a category slug.
With Category Title
Result:
[html]
<strong>Currently browsing WordPress</strong>: WordPress is a favorite blogguing tool of mine and I share tips and triccs for using WordPress here.
[/html]