1
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?

3

Yes, using this plugin:

http://wordpress.org/extend/plugins/sort-query-by-post-in/

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

| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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