I have searched high and low for this. How do I change my homepage based on the time of day? To be absolutely explicit, I want:
- Between 8am and 7pm - Homepage 1 (node/4)
- Between 7pm and 8am - Homepage 2 (node/5)
So I want to design two completely different homepages and then they change based on time of day.
I tried some code but it doesn't seem to do the job:
$current_front = variable_get('site_frontpage');
if($current_front== 'node/4'){
variable_set('site_frontpage','node/5');
}else{
variable_set('site_frontpage','node/4');
}
Note: I am not a code whizz so wouldn't know where to start with hooks and I'm a million years away from creating my own modules.