Many blogs use random header images in their header so that every time a page is reloaded, a new image appears in the header of the site. This adds interest and variation for readers.

To accomplish this, most sites use a combination of CSS and Javascript. Rob Griffith at The Robservatory relates how he set up his family’s site to have rotating header images without using any Javascript. His method involves

  • making a minor change to the CSS that calls the header image
  • creating a folder specifically for header images
  • naming the images sequentially (i.e. header1.jpg, header2.jpg)
  • and adding a few lines to header.php.

Random header images for WordPress>>