title: Wordpress 'orderby' => 'post__in' not working
body: <p>I am trying to make a custom query by combining two separate queries together, one being all posts with the category of <code>blog-hub-page</code> and the other being all remaining posts. The goal with combining these two queries is to have the <code>blog-hub-page</code> posts shown first so we can always have hand picked posts up front. </p>
  
  <p>I have done something very similar in the past with a custom post type and the code I have worked perfectly. For some reason when i try to do this with default posts it breaks. Because this seems to be such a straight forward task I feel like I must be missing something simple here. Any help is much appreciated!</p>
  
  <p>Here is my code:</p>
  
  <pre><code>        $blogHomeLoop = get_posts( 
              array( 
                  'post_type' =&gt; 'post', 
                  'fields' =&gt; 'ids',
                  'posts_per_page' =&gt; -1,
                  'tax_query' =&gt; array(
                      array(
                          'taxonomy' =&gt; 'blog_post_loc',
                          'field' =&gt; 'slug',
                          'terms' =&gt; 'blog-hub-page'
                      )
                  ),
              ) 
          ); 
          $remainingPostLoop = get_posts(
              array(
                  'post_type' =&gt; 'post', 
                  'fields' =&gt; 'ids',
                  'posts_per_page' =&gt; -1,
                  'tax_query' =&gt; array(
                      array(
                          'taxonomy' =&gt; 'blog_post_loc',
                          'field' =&gt; 'slug',
                          'terms' =&gt; 'blog-hub-page',
                          'operator' =&gt; 'NOT IN'
                      )
                  ),
              )
          );
          $mergedLoops = array_merge($blogHomeLoop, $remainingPostLoop);
          remove_all_actions( 'pre_get_posts' );
          wp_reset_query();
          $blogLoop = new WP_Query( 
              array( 
                  'post_type' =&gt; 'post',
                  'post__in' =&gt; $mergedLoops,
                  'orderby' =&gt; 'post__in',
                  'posts_per_page' =&gt; 9,
                  'paged' =&gt; $paged,
                  'has_archive' =&gt; true,
                  'suppress_filters' =&gt; true
              ) 
          );
  </code></pre>
  
  <p>Also here is the SQL from the query object without orderby set</p>
  
  <pre><code>SELECT SQL_CALC_FOUND_ROWS wp_posts.ID 
  FROM wp_posts 
  WHERE 1=1 
  AND wp_posts.ID IN (A LOT OF POST IDS HERE) 
  AND wp_posts.post_type = 'post' 
  AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'private') 
  ORDER BY wp_posts.post_date DESC 
  LIMIT 0, 9
  </code></pre>
  
  <p>Here is the same but with orderby set to post__in</p>
  
  <pre><code>SELECT SQL_CALC_FOUND_ROWS wp_posts.ID 
  FROM wp_posts WHERE 1=1 
  AND wp_posts.ID IN (A LOT OF POST IDS HERE) 
  AND wp_posts.post_type = 'post' 
  AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'acf-disabled' OR wp_posts.post_status = 'private') 
  ORDER BY FIELD(wp_posts.ID,A LOT OF POST IDS HERE AGAIN) 
  LIMIT 0, 9
  </code></pre>
  
  <p>The oddest thing is if I remove <code>'orderby' =&gt; 'post__in'</code> then it works like a default query. I've even confirmed that it is indeed two merged queries because I made another category and limited the second query to just that category. </p>
  
  <p>So currently it does grab all posts from the two merged queries, and I can tell it to order based on <code>ASC</code> or <code>DESC</code> which is nice, but as soon as I tell it to order by <code>'post__in'</code> then it acts as though there are no posts at all. </p>
  
  <p>If I <code>print_r($blogLoop-&gt;posts);</code> without <code>orderby</code> added then it shows posts as expected. If I add back in <code>orderby</code> then it says there are zero posts. Even though i'm able to <code>print_r($mergedLoops);</code> and it shows all the IDs as expected. </p>
  
  <p><a href="https://wordpress.stackexchange.com/a/220089/181964">Another question had a similar issue</a> I saw and their suggestion was to add <code>remove_all_actions('pre_get_posts');</code>, <code>wp_reset_query();</code>, and/or <code>'suppress_filters' =&gt; true</code> to make sure its not something with those but that solution didn't change anything for me. </p>