Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • dont worri i figured it out. from the aboce the body didnt have a # infront of it, i just put #content_wrap and it worked. no need to reply@!

    Hi, i want to change the content_wrap section to a different image background per page. I tried the above just changing the background and it worked, but on the website im working i want one static background colour and the image in the content_wrap section to change.

    so instead of body {} i changed it to content_wrap{} but it didnt work. any idea? for example:

    <?php if (have_posts()) : ?>

    <?php $cat_obj = $wp_query->get_queried_object(); $cat_id = $cat_obj->cat_ID; ?>

    <?php if (in_category(‘1001’) ):
    // category 1001 ?>
    <style type=”text/css”>
    content_wrap {background-color:#000;background-image:url(/images/background.jpg);background-repeat:repeat;}
    </style>

    <?php elseif (in_category(‘1002’) ):
    // category 1002 ?>
    <style type=”text/css”>
    content_wrap {background-color:#000;background-image:url(/images/background2.jpg);background-repeat:repeat;}
    </style>

    <?php endif; // end the if, no images for other other categories ?>

Viewing 2 replies - 1 through 2 (of 2 total)