[ask] How to show a specific banner in a specific post?

gr33n

Power Member
Joined
Oct 22, 2007
Messages
615
Reaction score
302
On my blog I have 4 category and in each category 3 posts.How can I display a specific banner for "category 1" on all posts in that category,another banner for "category 2" to all my posts in that category and so on?I want to do this for the banner in the header and for the onde in sidebar.I managed to show a specific banner in every category with the code below ..but when i go to any post in that category i get the general banner.

Code:
<?php if (is_category('golf-clubs')) { ?>

<<insert html code for golf club ads>>

<?php } elseif (is_category('golf-balls')) { ?>

<<insert html code for golf balls ads>>

<?php } elseif (is_category('golf-tips')) { ?>

<<insert html code for golf tips ads>>

<?php } else { ?>

<<any other html code to show for undefined categories>>

<?php } ?>
 
Back
Top