In the interest of sharing, I figured out how to display a different image depending on which category is currently being viewed;
PHP Code:
<?php if ( (int)$cPath == "1" ) {
echo '<img src="images/a.jpg">';
}
elseif ( (int)$cPath == "2" ) {
echo '<img src="images/b.jpg">';
}
else {
echo '<img src="images/c.jpg">';
}
?>
cPath 1 is category one, cPath2 is category two and so on. You can keep building this "if" statement for as many categories that you have.
The last "else" is to display a default image for any page outside of a category, e.g; privacy page, or shipping page etc.
I know this would be elementary stuff for a php coder, but i thought id post it in case someone is looking for a fix like this.
Cheers,
Scott.
Bookmarks