[wp-hackers] Switching theme depending time of the year

fris fris at fris.net
Wed Dec 28 06:39:00 UTC 2011


Have a whirl at this plugin, I use it, works great

http://wordpress.org/extend/plugins/theme-rotator/



-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Daniel Fenn
Sent: Tuesday, December 27, 2011 11:01 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Switching theme depending time of the year

Hello Aaron,

Thankyou for pointing out that that I could just change the style sheet with
the date function and the wp enqueue style function.

If I really wanted to, could I do a if, else in every theme file and have it
say if date is between 8th of Dec and 7 of Jan include this file else show
other content? Would that work?

Thankyou :)

On 28/12/2011, Aaron Jorbin <aaron at jorb.in> wrote:
> Instead of different themes, I would reccomend (since switching themes 
> is guaranteed to not requiring setting up options or be user action
> free) enqueueing[1] different stylesheets based on the php function
date[2].
>
> 1) http://codex.wordpress.org/Function_Reference/wp_enqueue_style
> 2) http://us.php.net/manual/en/function.date.php
>
> http://aaron.jorb.in
> twitter: twitter.com/aaronjorbin
>
>
> On Tue, Dec 27, 2011 at 10:42 PM, Daniel Fenn <danielx386 at gmail.com>
wrote:
>
>> Hello all,
>>
>> Bit late but merry xmas and happy new year to you all.
>>
>> I would like to know if there any way that I can have say 3 themes 
>> installed on a wordpress blog and have a script that will change the 
>> theme used depending on what time of the year it is or even down to 
>> what day it is. Does anyone know how I can do that?
>>
>> Thankyou :)
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


--
Regards,
Daniel Fenn
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list