richarduk
Member
Posted 1 year ago #
The following code is pasted into a category-7.php template
<?php if (is_category('7')) {
echo 'test';
}
?>
<?php echo 'yes';?>
I'm not managing to get the first bit of code to work, though the second displays ok.
Is there anything obvious that I'm doing wrong?
Hi richarduk. I'm no php expert but since it's so difficult to get an answer on these forums, I'll throw in my 2 cents. Your code snippet worked fine for me.
You did make sure that you have a category that actually has a numerical id of "7", correct?