Hey everyone. I hope this is the right place for this. I have a question about switching through random themes on my site. My design on my site is based on a style.css. I have several themes already made (style.css, style2.css, style3.css). Is there a way, using php, or javascript code to make my website automatically switch between these three themes? Thanks.
put refresh timer, can be done with javascript or php put random number use those numbers to point to each of your styles make a php code on this line <?php random number code script ?> <link href="<?php yourcode to echo the styles?>" rel="stylesheet" type="text/css" />
Moodswing's method should work well but if you apply that to all your pages. It will be a merry-go-round for the user because every different pages would probably have a different style. You probably want some consistency during the user's visit. Consider using <?php random number code script ?> and add those values into cookies/session which expires after 24 hours? So during the next visit, user will be able to experience something else.
Hmm, I am sorry, I am a real noob when it comes to randomizing and cookies, i guess. Is there anyway you could provide me a code? Basically I have 3 style.css files, and the only place I need to change something to change the look of the whole site is in the index.php in the <link herf part... I hope that helps a bit. Sorry for the difficulties.
The only thing that really changes on the layout is the colors of the images, and the color of some of the text, but the shape stays intact.
You could choose a random theme upon their first visit, then use sessions to keep that theme throughout their visit.