I noticed that D’Arcy Norman posted a little thing about how he setup some rotating banners based on my site … thanks! It isn’t like I invented the stuff but hey, I appreciate the nod! Since then, I’ve had a couple of people ask how its done. Here’s the simple way … first, install the Random Files plugin and put a bunch of headers into a directory and point to it. Then drop this code into your index.php file (if you are using the kubrick style) for WordPress by finding the #header style directive and changing it to:
background: url(“< ?php echo random_file('/images/random', 'jpg gif png jpeg'); ?>“) no-repeat bottom center;>
That assumes you have a directory called “random” in your images directory … that’s really it … oh, you might want to take a bunch of good pictures to make it worth while … not sure I’ve done that, but I’m doing what I’m doing. Thanks to Elliot Black for helping me get it rolling!
After its all said and done, watch your traffic explode as you sit there and reload your own blog 20 times to see it work!