[wp-trac] [WordPress Trac] #38034: post__in orderby not working when passed in an array to orderby
WordPress Trac
noreply at wordpress.org
Tue Sep 13 09:45:02 UTC 2016
#38034: post__in orderby not working when passed in an array to orderby
--------------------------+-----------------------------
Reporter: kelvink | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Currently order by `post__in` only works if you pass it as a string. If
you pass it inside an array, it won't orderby `post__in` at all.
To reproduce:
{{{#!php
<?php
$query = new WP_Query( array(
'post__in' => array( 1,2,3,4,5,6,7,8 ),
'orderby' => array( 'post__in' => 'desc', 'title' => 'asc' )
));
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38034>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list