To add some real design pizzazz to your WordPress theme, every time the page loads, you can randomly display different photos or other images in the header section of your theme. You can use this as a technique to generate interest for your visitors, or just as a fun personal experiment. With the method in this recipe, you'll be up and running in no time.
You should have a basic theme skeleton created, in order to take advantage of this recipe. In addition, you should also have created a variety of possible header background images, preferably each of the same size.
For the purpose of this recipe, you'll be working under the assumption that you want to randomly rotate the image displayed in the header section of your theme each time the page reloads. The blog title will sit on top of the random image.
First, you need to place the images in the correct place so that the code we're going to write can get to them.
Open the...