The WordPress template hierarchy indicates that index.php
is the template used, if category.php
and archive.php
are missing.
So, you can insert your code in index.php
, and wrap it in a is_category
conditional to make sure it’s only executed when a category archive is being displayed:
<?php
if( is_category() ) {
// category description
}
?>