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

i want to get the 5 images of a one post gallery and show this random,

example : [gallery id="123" orderby="rand" {numberpost=1 } or offset ? ]

[gallery] codex

tanks for help me.

share|improve this question
i think to get parametric include id of images with offset , any idea ? – Behnam Aug 24 '12 at 19:45
up vote 0 down vote accepted

Try installing the following plugin:


You'll be able to set how many images to show via this code:

[gallery link=file start=1 end=5]

Hope this helps!

share|improve this answer
yes this is work , tanks – Behnam Aug 26 '12 at 16:21
but this is show 5 image , i need to show 1 image by random order . you get it ? – Behnam Aug 26 '12 at 16:25
finally i found it ! [gallery link=file start=0 end=0 sortby="rand"] – Behnam Aug 28 '12 at 13:37

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.