Paul, here is a solution:
<?php
if (is_category('xyz')) {
Do something;
}
elseif (category('xyz2')) {
Do something else ;
}
elseif (category('xyz3')) {
Do something else;
}
else {
Do something if none of the above are true;
}
?>
– is_category can be replaced with any other conditional tag, ex: is_single(‘some single post’) OR is_post(‘some post’)
I haven’t posted before, and I don’t quite understand the backticks thing, and I can’t think of a better place to test it.
Here we go.
<?php
if (is_category('xyz')) {
Do something;
}
elseif (category('xyz2')) {
Do something else ;
}
elseif (category('xyz3')) {
Do something else;
}
else {
Do something if none of the above are true;
}
?>;