Hi
I hope that someone can help, I am creating a CMS and I have a page called Sectors and within Sectors I have sub-pages called Education, Healthcare, Business and Public each with their own background image controlled through css. With these pages I have linked them to categories so when the education page is selected all the categories within education show in the sidebar. What I am having trouble with is when the sidebar link is clicked it goes through to the category.php page but I would like to have the background for each appropriate page, ie. education posts with the education background, catering posts with the catering background etc.
I have used this code but does not work so has any one any idea why not.
<div id="postcontent"
<?php
if (in_category('education'))
{echo 'class="educationcontent"';}
if (in_category('healthcare'))
{echo 'class="healthcarecontent"';}
if (in_category('business & industry'))
{echo 'class="businesscontent"';}
if (in_category('public sector'))
{echo 'class="publiccontent"';}
?>>
I thought that this meant :IF in the category of education use this class of educationcontent, catering uses cateringcontent etc.. Have I made an error in the code or this is not for this.