Category Description: SEO for your Category Archive

Did you know WordPress had a special field for category descriptions?  Most people have seen it while working on category lists in their WordPress blog, but chances are you may have skimmed over it or paid it no attention.  You see, most themes are ill-equipped to take advantage of it – that means that, for most, it sits unused.  But there’s an untapped potential to be had in a category description – it’s an excellent way to apply some needed Organic SEO to your category archives.

PS: We’re talking about categories specifically, but every taxonomy has the chance for a description to be added, and every taxonomy has a template tag that can be used!

Step 0: The Category Description Tag

We’re going to be using the aptly-named ‘category_description’ tag.  If you’re nervous on editing HTML, this may be a bit daunting, but the benefits from adding a description to the categories well outweighs the effort put in.

<?php echo category_description(); ?>

Simply using category_description does nothing – we have to ‘echo’ (display) the text.  If there’s a specific category we want to display a description from, we simply add that category ID into the parameters of the tag:

<?php echo category_description('3'); ?>

This displays the description of category 3.

Step 1: Locate your Category Archive

This tag goes into the loop of the category archive.  Depending on what theme you’re using, you’ll be looking for this in a couple of different places:

  • loop.php
  • index.php
  • archive.php
  • category.php

Every theme is different, but we’re going to be looking for the “loop” in any case.  The loop is the part of the post that starts with:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

…or something similar.  We want to only have this code run if we’re on a category archive (it won’t hurt if it doesn’t, but we want to code with good practices in mind), so we’re going to add a WordPress ‘conditional tag’ as well.

<?php if (is_category()) { echo category_description; } ?>

IF this is a category archive, display the category description.

And that’s it.  Seriously.

Step 2: Adding a Category Description

Head to your dashboard and click on the Posts > Categories link.  If you’re adding a new category, take heed to the section below the name, slug, and category parent sections.  Fill in your category description as well, and hit save.

Adding a Category Description

If you’re editing an existing category, click on the category name in the right-hand side.  Same field, same value, just in a different spot:  In case you didn’t know, by the way: this text area accepts both straight text and HTML code, so feel free to go nuts with whatever non-text category description you want if you know HTML!

Screen Shot 2014-06-06 at 3.23.16 PM

Step 3: HTML Descriptions

“But Mitch!” you may say; “I want to add some different headlines, text, images, and other things in my category description, and I don’t know HTML”.  Never fear.  There’s a fantastic plugin called “Rich Text Tags” that will add aWYSIWYG (What You See is What You Get) editor to the category description box.  Add content just like you would add to a blog post and save.

Do you use category descriptions on your site?   Sound off in the comments below!

Photo by Surminga