Using PHP IF statement to change stylesheets
-
At the moment, I have 2 separate stylesheets that I’m using for a website.
One of the standard style.css and another is homepage.css which is being used just for the ‘Home’ page instead WP.
So I’m using the two pieces of code to call them:
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" /> <?php if (is_page('Home')) { ?> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/homepage.css" type="text/css"> <?php }; ?>
Naturually, this is causing some clashes with the 2 stylesheets and I also think it looks a tad messy.
Is it possible to write a statement that will only use homepage.css for ‘Home’ and style.css for the rest of the website?
Cheers. ??
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using PHP IF statement to change stylesheets’ is closed to new replies.