Using WP_Query without sorting
-
Hello,
I’m using WP_Query to retrieve several posts. I know witch posts I want and in witch order so I created an array with all the required IDs. Unfortunately the result of WP_Query does not reflect the order of my array with the IDs. Tried to use the orderby=none but no result:
$ids = array (60, 23, 78, 46, 105, 130) $args = array ( 'posts_per_page' => count($ids), 'post__in' => $ids, 'orderby' => 'none' ); $query = new WP_Query ( $args ); if ( $query->have_posts() ) : while...[bla bla bla]
The result is always in ID descending order.
Can anyone help me?
Thanks
PM
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Using WP_Query without sorting’ is closed to new replies.