WP_Query orderby post__in remains ineffective in the Loop [closed]

Set orderby to post__in. This preserves post ID order given in the post__in array (available with Version 3.5).

$args = array (
    'posts_per_page' => -1,
    'post__in' => $ids,
    'orderby' => 'post__in' 
);

Leave a Comment