View Full Version : Unique CSS per page?
joshualindquist
February 27th, 2006, 01:57
I built a Wordpress site with version 1.52, and I was able to change the headers by making a lot of duplicate header and css files. It then used a conditional statement in the page template to call different headers per page. I'm trying to do the same in Wordpress 2.01 and I can't seem to get the same results. Can anyone offer any suggestions for a workaround with version 2, or a plugin that might exist for this?
Cheers,
Josh
QuietCitizen
February 27th, 2006, 02:12
Random header rotation, or specific headers for each page?
joshualindquist
February 27th, 2006, 02:17
Specific headers per page (not post).. my page template (page.php) looked something like this back in WP 1.52:
php if (is_home()) get_header();
php if (is_page('3')) include(get_template_directory() . '/header.php');
php if (is_page('4')) include(get_template_directory() . '/header_2.php');
and so on..
Then in the header files, it would call for a different CSS file. In the WP 2.01 header files, I don't see where to get it to call up different CSS files. This might be a minor fix, or a different way of handling this all together?
ronincyberpunk
February 27th, 2006, 02:28
If you're using K2 then you just modify the headers.php and put the same tests in the header and then put the html for the css link inside the php test for the page.
<?php if (is_home()) { ?><link rel="stylesheet" type="text/css" media="screen" href="homecss.css" /><?php } ?>
sdollen
March 16th, 2006, 04:50
I'm trying to create some css just for my photo.php page. I wanted to have the secondary display none and then spread the pictures over the width of the page..so it won't look so pushed to the left.
I was using this:
<?php if (is_paged('Photos')) { ?> <link rel="stylesheet" type="text/css" media="screen" href="http://www.vondollens.us/wp-content/themes/k2/styles/photocss.css" /> <?php } ?>
am I missing something on that?
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.