A great way to keep your site up-to-date and current is to have a seasonal element – Santa at Christmas, Snow in the Winter, Pumpkins at Halloween, Bunnies at Easter..
One popular method of doing this is to have a banner area, however another way could be to use different backgrounds dependent on the time of year.
Either way – you may not have the time to go along and make the changes every few weeks/months, so here’s a way to automate it. Just make all the images and stylesheets you need ahead of time!
Here’s an example that will change your spreadsheet based on the month, with a fallback if you don’t want a special design every month:
<?php $dateCheck = date('F');
if ($dateCheck == "March"):?>
<link href="styles-spring.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($dateCheck == "July"): ?>
<link href="styles-summer.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($dateCheck == "October"): ?>
<link href="styles-halloween.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($dateCheck == "December"): ?>
<link href="styles-christmas.css" rel="stylesheet" type="text/css" media="screen" />
<?php else: ?>
<link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
<?php endif; ?>
And in this example the stylesheet changes based on the time (H = is hours on a 24 hour clock with leading zeros):
<?php $timeCheck = date('H'); echo $time;
if ($timeCheck > 04 && $timeCheck <= 09):?>
morning: <link href="styles-morning.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($timeCheck > 09 && $timeCheck <= 17): ?>
<link href="styles-day.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($timeCheck > 17 && $timeCheck <= 20): ?>
<link href="styles-evening.css" rel="stylesheet" type="text/css" media="screen" />
<?php elseif ($timeCheck > 20 && $timeCheck <= 04): ?>
<link href="styles-night.css" rel="stylesheet" type="text/css" media="screen" />
<?php else: ?>
<link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
<?php endif; ?>


Hey, I am rebuilding my site, and need to load different stylesheets on different pages. I know it can be done with php, with else and if, like you did with the time, but how do I do it by page?
thanks
@Jerry Lee, check out this video blog, about conditional statements: PHP Includes with Conditional Statements