I’d like to have my header banner change every day, chosen (e.g. randomly) from a list/folder of images.
So far I only found plugins that select a random banner per post or per page view, neither is what I want. Do you know of a plugin, or any other way?
Edit: Example. I’m adding a folder to my wordpress installation. This folder contains some header images. Every 24 hours, an random image is chosen from this folder and becomes the header image for 24 hours, until another random image is chosen.
Actually, I don’t care how exactly the image is chosen – I’m fine with rotating through all images in the folder as well. The only thing I care about is that the chosen image stays there for 24 hours.
Basically it’s the same as if I were picking a new header image manually every day.
replace your current header with this. I will of course help you implement this further if you need help. (or if you need the code explained)
If you can’t code, sorry no.
If you can code, look at which hook these plugins are using, and create a new plugin accordingly.
See http://www.alistapart.com/articles/betterrotator/ I use it myself on a few sites.
You can take a look in this Javascript example,
it’s very easy to implement it in your theme.
Based on Cronco’s answer and a lot of experimentation (I’m neither familiar with PHP nor with the inner workings of wordpress itself) and some cleanup, I found a solution that perfectly satisfies my needs.
Using the theme TwentyTen, I edited its header.php like this:
If no specific image is set for the displayed page (this is specific to this theme), then a header image is chosen based on the current day from all jpg images in the
theme_directory/banners
folder, which has to be created.I tried to randomize the image order more, but apparently this is not possible in an easy way, so I went with fixed order.