Can’t get 2 style sheets to work – Have tried everything
-
Alright. I’ve been trying for almost a week from gleaning information off this forum but now I need to ask directly.
I have customized/created two Style Sheets (style.css -default, and widesidebar.css). I also have two page templates (page.php – default and page2.php).
I have edited the header.php of my theme “Wilderness” so that under the 1st “Link Rel” section it reads:
<?php
if ( is_page_template(‘Page2.php’)) { ?>
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_directory’); ?>/widesidebar.css” />} else { ?>
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_directory’); ?>/style.css” />
<?php } ?>Thus far my entire site is still using the default style sheet, I tried using my “About” page as an example (changing the page template used when editing the page in WP write section) to use the other style sheet but nothing has changed.
Questions: – Is the code wrong? Have I missed a step?
– Should I be trying to use (is_page(‘about’) (for example) instead?Any help would be fantastic!!!!
- The topic ‘Can’t get 2 style sheets to work – Have tried everything’ is closed to new replies.