WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Sort Query by Post In

A very simple plug-in that allows post queries to sort the results by the order specified in the "post__in" parameter.

  1. Install easily with the WordPress plugin control panel or manually download the plugin and upload the extracted folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Modify the appropriate post queries with the orderby parameter set to post__in

Example

query_posts( array( 'post__in' => array(20,10,106),  'orderby' => 'post__in' ) );

That will retrieve posts with IDs 20, 10, and 106 in that order!

Requires: 3.0 or higher
Compatible up to: 3.4.2
Last Updated: 2012-10-20
Downloads: 3,125

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
100,1,1 100,1,1
100,1,1 100,3,3
100,1,1
100,2,2
100,1,1
100,1,1
100,1,1
100,2,2
100,1,1