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
query_posts( array ( 'post__in' => array( 5, 76, 21, 56, 3 ) ) );

I'd like to query the Loop using post__in and a set Wordpress IDs. I'd then like to run through the Loop in the exact order of the query. Does anyone know if that is possible?

share|improve this question
up vote 3 down vote accepted

Yes, using this plugin:


Also see http://core.trac.wordpress.org/ticket/13729

share|improve this answer
I spent all my time searching the Wordpress Codex that I didn't think to look in the plugins... Thanks! – Andy Cook Feb 22 '11 at 2:30
Hoping they implement this in 3.5. Thanks! – AlxVallejo Oct 1 '12 at 15:09

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.