View Single Post
Old 04-19-2007, 10:21 AM  
scouser
marketer.
 
Industry Role:
Join Date: Aug 2006
Location: bcn
Posts: 2,280
ok, lets say you've got 3 categories,
babe
lesbian
black

this is untested, but should work ...

PHP Code:
<?php
if (is_category('babe')) {
?>
<a href="#"><img src="yourbabeadvert.jpg" alt="" /></a>
<?php
}

if (
is_category('lesbian')) {
?>
<a href="#lesbian"><img src="yourlesbianadvert.jpg" alt="" /></a>
<?php
}


if (
is_category('black')) {
?>
<a href="#black"><img src="yourblackadvert.jpg" alt="" /></a>
<?php
}

?>
As said, http://codex.wordpress.org/Conditional_Tags is where you want to look. Hit me up over icq if you need help. Note- that will display the ad when viewing just the category page itself. To display it when viewing a post in category x, use in_category()

Last edited by scouser; 04-19-2007 at 10:23 AM..
scouser is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote