Support » Fixing WordPress » changing stylesheet for single posts in specific category

  • I’ve been searchign for week on the forum and still can’t figure it out.

    i’ve been working on a gallery page for my friend. I was able to customize the CATEGORY PAGE by creating a category-7.php file. Thats not the problem, see here: http://www.sayuncleinc.com/?cat=7

    However, i want to change the way the individual post looks when the post is in category 7. For example: http://www.sayuncleinc.com/?p=30

    the problem is, if i change the page.php file, then all the other individual posts will change as well.

    I can’t seem to figure out the conditional tags, and this did not work:

    <?php if( is_page('') ) {
    ?>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <?php
    }
    if ( is_page() && !is_category('7') ) {
    ?>
    <link rel="stylesheet" href="http://www.sayuncleinc.com/wp-content/themes/pride/style2.css" type="text/css" media="screen" />
    <?php }
    ?>

    so i have no clue what to do.. How can i use the conditional tags to change the style sheet when you are viewing a specific post from a specific category?

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘changing stylesheet for single posts in specific category’ is closed to new replies.