WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In theme Twenty Eleven, do the default images rotate randomly, or with some sequence?

As far as I can see, I think it's random, but there might be some pattern/sequence that I didn't notice.

share|improve this question
up vote 1 down vote accepted

the header image is picked at random;

see this line in /wp-includes/theme.php line 1476:

$random_image = array_rand( $headers );

out of interest: why are you asking, and what difference would it make?

share|improve this answer
I'm asking because I'm changing the images and wondered whether my sequence of images would be random or if they could appear in order, kind of like an animation: richardclunan.com – Richard Aug 7 '11 at 22:52


get_header_image() uses is_random_header_image() to check if you hadn't selected specific image and get_random_header_image() to retrieve header if true.

share|improve this answer

well It Rotates Randomly. But you can change it with your sequence if you want remove random function from header.php and add urs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.