Skip to content

WordPress: Display Category Description

This content will be shown before all post

Today I needed to be able to display the Category Description for a set of WordPress posts on the Category Index page.

By adding the following code to archives.php (or index.php could also work depending on your theme files), this was an easy success:

<?php if(is_category()) {
$currentCat = get_category(get_query_var('cat'),false);
echo category_description( $currentCat->term_id );
} ?>

This content will be shown after all post