• Hi,

    I am using code in my header.php file to load different stylesheets based on category. It loads the css file but the linked images do not show. The image url in the css is being appended to the category and post name no matter how I put it into the stylesheet, absolute or relative URL. Any one know why?

    The code is here

    <?php
    if in_category('7')){
    include (TEMPLATEPATH.'/style.css');
    }else if (in_category('8')){
    include (TEMPLATEPATH.'/style2.css');
    }else{
    include (TEMPLATEPATH.'/style.css');
    ?>

    Thanks

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

The topic ‘Different categories with different stylesheets not displaying’ is closed to new replies.