Ya I use one on my blog, not using javascript but a php script called rotate.php
simple HTML, but adjust to what you need inside your header.php file
<background=”rotate.php”>
Matt of wordpress fame! has an example here:
http://photomatt.net/scripts/randomimage/
peace
Thread Starter
oval
(@oval)
Dear Iscifi,
Thank you so much for the tip! Works like a charm.
Oval
This is great code. Simple & elegant.
I do have one question on implementation.
I am rotating the background image for the pages.
However, I want to use a different random background image on the index.php and single.php templates. I am using the same code to get the image in each file
<style type="text/css">body {
background-image: url(../../../images/backgrounds/rotate.php);
}
However, when I go from page to page my FireFox cache is loading the same background image instead of getting a new one (Internet Explorer 7 seems to load it new each time). If I <shift>+”Refresh” I get a different background each time but unless I do the force refresh each page loads with the cached background.
Is there a good way to work around this?
I assume I can use a different “random image” directory for each template and since I would call the random image from a different place there would not be the same one in the cache, but that seems very clunky.
Any ideas?
I have noticed this too. Solution?
how could i do a rotating image in the header? same code?
That’s what I’m using it for…
Hi guys,
It has been a few weeks. Does anyone have a clue on the different background on each page?
If you insert the style tag `<style type=”text/css”>body {
background-image: url(../../../images/backgrounds/rotate.php);
}` into a text widget at the bottom of your sidebar it should reload with every page load.