WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would I display HTML conditional on a particular category page?

Say my permalinks to the category pages are


How would I cast the <?php if ... ?> to do this, and within what template of my theme?

I'm using WP 3.3.1. If I need to provide more information I'll be happy to. Thanks!

share|improve this question
up vote 3 down vote accepted
if(is_category('awesome-category')) echo "whoa awesome category here!!;

probably in category.php, but it really depends on the setup of your theme... if you are using a child theme, etc. also you could create a special template just for that specific category.


see: http://codex.wordpress.org/Template_Hierarchy

share|improve this answer
possible category template name: category-awesome-category.php - codex.wordpress.org/Category_Templates – Michael Feb 24 '12 at 13:57
you're right. fixed. – helgatheviking Feb 24 '12 at 15:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.