Adding a description to your categories

Robbert mailed me today asking with which template tags I used to make the description show up on my category pages. Well, first of all, you can add a description to your categories under Manage -> Categories:

Category descriptions overview

If you press the edit button there you can edit them like this:

Edit category description

The description is what we’ll use on the category pages. Note that you can use HTML in those descriptions should you want to do that.

The rest of this is almost as simple as the previous steps where. You go in to your templates and you edit archive.php with code that looks something like this:

<h1 class="cattitle"><?php echo single_cat_title(); ?> Archives</h1>
<p class="catdescription"><?php echo category_description(); ?> </p>

You can now style the cattitle and catdescription classes to your wishes!

Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

4 Responses

  1. RobbertBy Robbert on 21 August, 2007

    Now this is what I call service! Thanks a lot, I really appreciate this post!:)

  2. Joost de ValkBy Joost de Valk on 21 August, 2007

    My pleasure :)

  3. WebdesignBy Webdesign on 5 September, 2007

    allways great your wordpress tips. it allways brings me on ideas :D

  4. NietsnutBy Nietsnut on 28 December, 2007

    thnx Joost, this was exactly what I Need, just some finetuning and it’s done.