title: Display multiple category posts on a page in wordpress
body: <p>I want to display posts for multiple categories. I have created a MULTISELECT drop down of all categories using code below:</p>
  
  <pre><code>&lt;form method="get" action="&lt;?php bloginfo('home');?&gt;" &gt;
      &lt;select name="cat" multiple&gt; 
       &lt;option value=""&gt;&lt;?php echo esc_attr(__('Please Select Your Choice')); ?&gt;&lt;/option&gt; 
       &lt;?php 
        $categories=  get_categories('show_count=0&amp;orderby=name&amp;echo=0&amp;hierarchical=true&amp;depth=1&amp;taxonomy=category&amp;exclude=1'); 
        foreach ($categories as $category) {
  
          $option = "&lt;option value=$category-&gt;term_id&gt;";
          $option .= ucfirst($category-&gt;cat_name);
          $option .= '&lt;/option&gt;';
          echo $option;
        }
       ?&gt;
      &lt;/select&gt;
  &lt;input type="submit" id="searchsubmit" value="Search" name="submit"/&gt;   
  &lt;/form&gt;
  </code></pre>
  
  <p>Whenever i selects more than one category, I can see all cat ids in url like: <code>http://abcd.com/?cat=7&amp;cat=8&amp;cat=9</code> But it displays only last category posts using archieve.php file. I want to display all selected category posts on the page.</p>
  
  <p>Thanks in advance. </p>