Codex tools: Log in / create account
Contents |
Returns the description of a category.
<?php echo category_description($category); ?>
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.
<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.
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,