Apr 7

WordPress SEO: Using Category Descriptions on Archive Pages

Example of category description on The Wicked Blog archive page

Example of category description on The Wicked Blog archive page

Well, it looks like I get to write the first boring technical post on our new blog. Yay.

I spend a lot of my days playing with several WordPress installs (my CMS of choice) tweaking and testing different things on different sites. Something I am going to be instituting globally across the sites I manage, especially here on The Wicked Blog, is using the built-in WordPress category description function and the template tag to help build keyword authority for category archive pages.

If you’ve ever looked at the category management section on WP, you’ve probably seen the description box in the Add New/Edit screen along with the super-helpful note:

The description is not prominent by default, however some themes may show it.

I personally have yet to come across a theme that actually makes use of this category description on the archive pages, or any other pages for that matter, and, for me, this is a key place in which you can help boost your category archives’ authority in search results.

If you subscribe to the idea that the best way to manage duplicate content on your site is to put each post into one category and either disable or noindex the tag, date and author archives (all of which can be accomplished using Yoast’s excellent Meta Robots plugin), then you have created several powerful top-level pages. We can then help those pages on their way by putting static, keyword-rich text on the archive pages.

Archive pages are by nature dynamic and constantly changing as you post more content. This makes it difficult to keep consistent keyword-rich text on these pages to give the search engines some meat to sink their teeth into. If there’s a way you can make part of the page look the same keyword-wise every time the spiders index it, the better for your site.

Basically, the category description is exactly what it says it is, the description of your category. So simple, in fact, that it’s easy to make use of. Here’s how you can go about incorporating this in your archive template:

1. Have your SEO copywriter put together a short paragraph, two or three sentences, that effectively describes your subject using the keywords you are targeting for that category.

2. Go to your WordPress dashboard and enter that paragraph into the description area. If you are using the Headspace 2 SEO plugin (recommended), add it in the Page Description box for that, too.

Now for the coding part. Here’s how I set it up for this site:

3. Open up your theme’s archive.php file and look for the start of the WordPress loop. Depending on your theme, the way the different types of archive pages are handled can be written many ways. In the default theme that comes with WordPress, these are defined at the top and the section for the category archives looks like this:

1
2
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class="pagetitle">Archive for the &#8216;<?php single_cat_title(); ?>&#8217; Category</h2>

4. Now, replace line #2 of the above with the below:

1
2
3
4
<div id="catDescription">
<h2><?php single_cat_title(); ?></h2>
<p><?php echo category_description($category); ?></p>
</div>

5. Here is the CSS that I used to style that section:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#catDescription {
border:10px solid #ddd;
margin:0 5px 5px;
padding:10px;
}

#catDescription p {
display: block;
margin: 0;
text-align: justify;
font-size: 9pt;
line-height: 14pt;
}

#catDescription h2 {
padding:0px;
margin:5px 0 5px 0;
}

6. Save your files and voila, you will now display the category description at the top of your archive pages….like so: Social Media.

3 Comments/Tweetbacks/Pingbacks

Comments

  • morgan says:

    Is there a way to get link category descriptions to display too?

  • Summer says:

    WOW! That is the exact answer I was looking for (and it worked on the first try!). I wasted a ton of time trying to find a plugin that does exactly this. Thank you! I’m not only using this for SEO purposes, but because many people want to buy advertising on a specific category page. So your solution, plus a plugin that allows html in the category description and I’m stoked!

  • vitalous says:

    This works, but this WordPress Template Tag ‘category_description()’ insists on encasing the description in ‘p’ tags. Using the above example yields double-tagged, and two linefeeds. I wis there were a way to display category descriptions ‘inline’ with my content. Without using advance PHP or SQL editing, that is!

    John

Leave a Reply