Hi, I read this post – https://kriesi.at/support/topic/add-h1-tag-to-category-pages/, and I am trying to do the same thing – add a H1 tag to category pages. However, I cannot locate the code referenced, and wondering if there was a change to the archive.php file since this was posted. The closest I could find was this:
echo “<div class=’category-term-description’>{$tds}</div>”;
Thanks,
Christine
Hey cpetroff1321!
Yes, it has been updated, also make sure you are using a child theme so any changes you made won’t be overwritten during the theme update. You should find this code:
$tds = term_description();
if($tds)
{
echo "<div class='category-term-description'>{$tds}</div>";
}
Just replace it with this:
if( is_category() )
{
echo '<h1>' . single_cat_title('',false) . '</h1>';
}
else
{
$tds = term_description();
if($tds)
{
echo "<div class='category-term-description'>{$tds}</div>";
}
}
Hope this helps ;)
Best regards,
Nikko