If you’d like to create images for a hero section of a website and put those images in a directory and have them appear as random background images that change each time a person visits a page, this is how you do it with WordPress. The more images you have, the more random it is.
If this saved you time, and I’m sure it did, consider a donation via PayPal to email@example.com.
This gist has two sets of code. The first is the CSS is which is an example only. The next file is the random image php from a directory for Genesis (modifiable for any WordPress theme). Adjust as needed for your requirements.
All the best,
Affiliate Notice: I have affiliate links all over the place for companies I recommend. By purchasing through these links you help to support my family and to keep my blog going.
Add your Voice
Comment Policy: I accept clean HTML in comments, but don’t overdo it please. Please be kind to others.