I'm just a WordPress user, but am trying to may some tweaks to my pages. On my post pages (single.php) I would like to display an image in the post unless it is in a particular category. Just picking up tidbits here and there, this is what I tried:
------------
<?php
$findme = 'My Category';
$pos = strpos($category->cat_name, $findme);
if ($pos === false) {
echo
'<a href="http://www.test.com/"><img class="alignright right size-full wp-image-34" title="Test" src="http://www.test.com/test.gif" alt="Image Link" width="228" height="152" /></a>';
}
?>
-------------
The result I am getting is that it displays the image no matter what the category or categories of the post. When I did "echo $pos", it didn't display anything.
Any help would be greatly appreciated. Specific code would be wonderful! I don't really know PHP and am just getting my feet wet.
Thanks!