Problem With Conditional Tags
-
Hey Folks,
I am having a problem with conditional tags. I want a special message to appear above all of the post that are in category 12. Therefore I am using the following conditional tag
<?php if(is_category('12')){echo 'This Is Category 12';}?>
However, this tag only works on category templates and archive templates. It does not work on single post templates. Does anyone know why? And, does anyone know how I can display a special message on single posts that are in a certain category?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem With Conditional Tags’ is closed to new replies.