Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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.



share|improve this answer
possible category template name: category-awesome-category.php - – 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.