Display based on Category
-
With the rise of Paid-to-Blog sites on the ‘net, it’s been easy to make money while blogging. The problem with most paid-to-blog sites is they don’t permit ads from other sites in the entries. Paysite1 (for example) is the only Category/Tag I need these ads to show up in every time it’s chosen on a new post.
Say I have a category named Sponsors, that’s broken down into three sub-categories, Paysite1, Paysite2, Paysite3
Is there a way to format my index.php/single.php template files so that an image will load only if Paysite1 is linked as the category? This way it isn’t a static image in the closing of all the weblog entries, it’s only displayed as a direct link with the Paysite1 category?
I hope I’ve said this clearly, my apologies if I haven’t. From a programmers stand point
`<?
If ($category=20)
{display: https://www.site.com/advertise.gif}
Else
{display: https://www.site.com/blankimage.gif}
End If
?>`Is there a hack for this? I went through the codex and wp-plugins.net but nothing really stood out.
I’m using WP 2.1.3.
- The topic ‘Display based on Category’ is closed to new replies.