Determining body/page class
-
I’m trying to assign different CSS pages for only the blog pages of my template. I am using is_home() and is_single() conditional statements in the header in order to apply the custom style sheet to only those pages. The problem is that other pages in the site (portfolio pages) are also single posts. How can I filter out pages that also contain the “single-post” class in the body tag?
Here’s what I have so far:
<?php if ( is_home() || is_single() ) { ?> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/skins/Dark.css" type="text/css" media="screen"> <?php } elseif ((get_option_tree('theme_skin')) !== "Light") { ?> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/skins/<?php echo get_option_tree( 'theme_skin' ); ?>.css" type="text/css" media="screen"> <?php } ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Determining body/page class’ is closed to new replies.