title: Display query posts at random from multiple categories
body: <p>I want my WP_Query to display six posts in total from across all categories listed in the array at random.</p>
  
  <p>The loop/Query I have written only displays posts from the first category (Art) in the array. </p>
  
  <p>What have I got wrong?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="main-news"&gt;
     &lt;!-- Define our WP Query Parameters --&gt;
     &lt;?php $the_query6 = new WP_Query(array('posts_per_page' =&gt; 6, 'category_name' =&gt; 'Art' , 'Technology', 'Fashion-Beauty')); ?&gt;
  
     &lt;!-- Start our WP Query --&gt;
     &lt;?php while ($the_query6 -&gt; have_posts()) {
      $the_query6 -&gt; the_post(); ?&gt;
      &lt;div class="new-content"&gt;
      &lt;!-- Display the Post Image with Hyperlink --&gt;
       &lt;div class="new-image"&gt;&lt;?php the_post_thumbnail('fashion');?&gt;&lt;/div&gt;
       &lt;div class="new-content-excerpt"&gt;
       &lt;!-- Display the Post Category Hyperlink --&gt;
        &lt;h5&gt;&lt;?php 
        foreach((get_the_category()) as $category) {
        echo $category-&gt;cat_name . ' ';
        }
        ?&gt;&lt;/h5&gt;
  
        &lt;!-- Display the Post Title with Hyperlink --&gt;
        &lt;h1&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h1&gt;
       &lt;/div&gt;
      
      &lt;/div&gt;
      &lt;!-- Repeat the process and reset once it hits the limit --&gt;
     &lt;?php } ?&gt;
     &lt;?php wp_reset_postdata(); ?&gt;
    &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>