How to display category descriptions - LearnWP

How to display category descriptions

How to add WordPress Category Descriptions

The category description is a feature available in WordPress. WordPress acknowledges that the category description “… is not prominent by default; however, some themes may show it.

This is a missed opportunity.

When a theme doesn’t show the category description, I believe that this is a missed opportunity. Category descriptions add value to a blog.

Here’s the value added:

  • Category descriptions are a great way to summarize for your site users what your category is about.
  • Writing a description forces you to think about your site structure. Ask yourself “Why is this category here?
  • Adding a category description turns a mere archive into a page that you can direct site visitors to –  you can lead visitors to related content by adding a category description.
  • Adding a good category description can also help your archive pages to rank in search results.
  • You can link to your category pages from within your page content sending visitors to all your blog has to offer on a subject

Are you convinced?

Here’s how to add category descriptions.

To create your category descriptions, under posts, go to “edit category. ” That’s where you’ll craft your category descriptions.

If you’re using the popular Responsive Theme you’ll need to modify your theme following these instructions. If you’re using a different theme the instructions may not be exact.

Make sure you are working on a child theme so your customizations won’t be overwritten when the theme updates.

Before you make any code edits backup! Use at your own risk.

First, edit the archive.php file

Open the archive.php file and find

 get_template_part( 'loop-header' );

add this code on the line below the closing php tag

' . $category_description . ''; ?>

save the file in your child theme folder and upload it to the server.

Then, edit the loop-header.php file

We will want to replace the words Blog Archives with the name of our category.

Open the loop-header.php file and find

_e( 'Blog Archives', 'responsive' );

and replace it with

the_category(', ');

save the file in your child theme folder and upload it to the server.

Make the most of the descriptions

Write great category descriptions for each of your category archive, and don’t forget the SEO meta title and descriptions too. Tip: Use the WordPress SEO by  Yoast plugin to optimize your category and tag archive pages with crafted meta titles and descriptions.

Related Posts

If you liked this post, you might also be interested in one of these.
Blogging, Content Curation & Copyright
Choosing the Best Hosting For Your WordPress Website

2 thoughts on “How to display category descriptions”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top