different background image for each category
-
Hi how do I make it display a different background image in each category?
Currently my themes style.css has this to display one image as background:
body {
background: #000000 url(/myimage.jpg) repeat-x;
color: #FFF;
}So can I point the URL of the image to a php file and somehow do a:
<?php if(in_category(‘1’))
{
echo(‘bg_category1.jpg’);
}
else if(in_category(‘2’))
{
echo(‘bg_category2.jpg’);
}
else if(in_category(‘3’))
{
echo(‘bg_category3.jpg’);
}
else if(in_category(‘4’))
{
echo(‘bg_category3.jpg’);
}
?>
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘different background image for each category’ is closed to new replies.