Different stylesheets for different templates
-
I have been following this tutorial in order to have different stylesheets for different page templates. I changed the page.php file to remove the sidebar in the default page that a lot of my plugins call when they generate pages. I have created a page template called page_prevdefault.php but I want to have it use a different stylesheet.
I have added the following under this line in the header.php:
<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>”/>
<?phpthe following:
<?php
if ( is_page_template(‘page.php’)) { ?>
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_directory’); ?>/style.css” />
<?php } ?><?php
if ( is_page_template(‘page_prevdefault.php’)) { ?>
<link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_directory’); ?>/page_prevdefault.css” />
<?php } ?>but unfortunately it doesn’t work and the template page_prevdefault.php still uses style.css. If you could help that would help me out a lot!!
- The topic ‘Different stylesheets for different templates’ is closed to new replies.