Is there a plugin or way to ....

jack61

Newbie
Joined
Nov 25, 2009
Messages
4
Reaction score
9
Is there a plugin or way to tell WPress to post a certain banner or link only in a specified category in every post on a auto blog. I use wprobot.
I search in all the ways I could think of in the forum but couldn't find anything.:rolleyes:
 
yes I know how to do it without a plugin.

Code:
<?php

if (is_home())
{
echo "<a href='link'><img src='image'></a>";
}	

elseif (in_category('3'))
{
echo "<a href='link'><img src='image'></a>";
}

elseif (in_category('4'))
{
echo "<a href='link'><img src='image'></a>";
}

else
{
echo "<a href='link'><img src='image'></a>";
}

?>


easy as pie :P give me rep please :) PM if you need anything I'm a WP virtuozzo :)

edit:

you need to edit the theme code and put it for example in the header.php or something :P
 
Thanks Rushdie
If I understand correct the '3' and '4' is where the category name come in. I will try it a bit later on. Have a idea or 2 for plugins for WP will PM you.
Thanks again.

Work 100%, I add it in the "Single post" page and work nice.
 
Last edited:
actually it's different. when you go to your wp-admin and to category management and point your mouse to the category link, down in your browser you will see an address with the category ID. I'm not sure if you can use a normal category name, but anyway it's not object oriented so don't do it.

cheers
 
Back
Top