WordPress – Customising your Archive.php Theme File

3d Animation

If you’re creating a new theme in WordPress and want to automatically add the description and title of your category archive to your page. Simply add this block of code to your template (archive.php) file in your theme folder.

<h1><?php single_cat_title('',true); ?></h1>

<div id="categoryContent"><?php echo category_description( $category_id ); ?></div>

If you need to add the Title for a Tag Archive / Taxonomy page use:

<h1><?php single_tag_title(); ?></h1>