Any tips to re-theme a website based on date?

I think the really difficult part would be doing the designs. There are lots of ways to do this, but here’s one off the top of my head:

I wrote a blog post with a snippet that detects the four seasons, though I can’t find it. Here’s one I wrote that detects holidays. You could modify it to add a date range around each one, and use that to set a System Setting (you’d create) to the name of the season or a default for non-holidays. Then you could name each theme after the season, and use a System Setting tag to make the theme active.

A cron job could run the snippet each night around midnight.

It might be possible to do this by just using a different CSS file for each season. Then it would be dead easy to use the System Setting tag in the Template where you load the CSS file.

1 Like