title: How to fix the duplicate of the form submission in Wordpress?
body: <p>I am working on fixing the defaulte search form in wordpress.
  I am just setting some filters to make the user choose then click ok to search with filter and everything worked fine except the tags checkbox.</p>
  
  <p>I tried all the these:
  tag (string) – use tag slug.
  tag_id (int) – use tag id.
  tag__and (array) – use tag ids.
  tag__in (array) – use tag ids.
  tag__not_in (array) – use tag ids.
  tag_slug__and (array) – use tag slugs.
  tag_slug__in (array) – use tag slugs.</p>
  
  <p>but the results are the same.</p>
  
  <p>My search form in searchform.php</p>
  
  <pre><code>&lt;form role="search" method="get" id="searchform" class="skytube-search-form" action="&lt;?php echo home_url( '/' ); ?&gt;"&gt;
      &lt;input type="search" placeholder="&lt;?php esc_attr_e( 'Search for what you want...', 'aldoustech' ); ?&gt;" value="&lt;?php the_search_query(); ?&gt;" name="s" id="s" onkeyup="search()"&gt;
      &lt;label for="order"&gt;الترتيب حسب التاريخ&lt;/label&gt;
      &lt;select name="order"&gt;
          &lt;option &lt;?php if ($_GET['order'] == 'ASC') { ?&gt;selected="true" &lt;?php }; ?&gt;value="ASC"&gt;الأقدم&lt;/option&gt;
          &lt;option &lt;?php if ($_GET['order'] == 'DESC') { ?&gt;selected="true" &lt;?php }; ?&gt;value="DESC"&gt;الأحدث&lt;/option&gt;
      &lt;/select&gt;
      &lt;label for="posts_per_page"&gt;عدد النتائج المعروضة&lt;/label&gt;
      &lt;select name="posts_per_page"&gt;
          &lt;option &lt;?php if ($_GET['posts_per_page'] == '10') { ?&gt;selected="true" &lt;?php }; ?&gt;value="10"&gt;10&lt;/option&gt;
          &lt;option &lt;?php if ($_GET['posts_per_page'] == '50') { ?&gt;selected="true" &lt;?php }; ?&gt;value="50"&gt;50&lt;/option&gt;
          &lt;option &lt;?php if ($_GET['posts_per_page'] == '100') { ?&gt;selected="true" &lt;?php }; ?&gt;value="100"&gt;100&lt;/option&gt;
      &lt;/select&gt;
      &lt;label for="category_name"&gt;التصنيف&lt;/label&gt;
      &lt;select name="category_name"&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == '') { ?&gt;selected="true" &lt;?php }; ?&gt;value=""&gt;
              الكل
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'مسلسلات-أنمي') { ?&gt;selected="true" &lt;?php }; ?&gt;value="مسلسلات-أنمي"&gt;
              مسلسلات أنمي
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'مسلسلات آسيوية') { ?&gt;selected="true" &lt;?php }; ?&gt;value="مسلسلات آسيوية"&gt;
              مسلسلات آسيوية
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'مسلسلات-الأنيميشن-و-الكرتون') { ?&gt;selected="true" &lt;?php }; ?&gt;value="مسلسلات-الأنيميشن-و-الكرتون"&gt;
              مسلسلات الأنيميشن و الكرتون
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'أفلام-أنمي') { ?&gt;selected="true" &lt;?php }; ?&gt;value="أفلام-أنمي"&gt;
              أفلام أنمي
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'أفلام آسيوية') { ?&gt;selected="true" &lt;?php }; ?&gt;value="أفلام آسيوية"&gt;
              أفلام آسيوية
          &lt;/option&gt;
          &lt;option &lt;?php if ($_GET['category_name'] == 'أفلام-الأنيميشن-و-الكرتون') { ?&gt;selected="true" &lt;?php }; ?&gt;value="أفلام-الأنيميشن-و-الكرتون"&gt;
              أفلام الأنيميشن و الكرتون
          &lt;/option&gt;
      &lt;/select&gt;
      &lt;div&gt;
          &lt;?php
              if( $terms = get_terms( array(
                  'taxonomy' =&gt; 'post_tag',
                  'orderby' =&gt; 'name'
              ) ) ) : 
                  foreach ( $terms as $term ) :
                      echo '&lt;input type="checkbox" name="tag" value="' . $term-&gt;slug . '"' . (($_GET['tag'] ==  $term-&gt;slug)?'checked':"") . '&gt; ' . $term-&gt;name;
                  endforeach;
              endif;
          ?&gt;
      &lt;/div&gt;
      &lt;input type="submit" id="searchsubmit" value="&lt;?php esc_attr_e( 'Search', 'aldoustech' ); ?&gt;"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>When I choose some of the filters then hit search the url became something like that.</p>
  
  <pre><code>http://localhost:8080/wordpress/?s=&amp;order=ASC&amp;posts_per_page=10&amp;cat=3
  </code></pre>
  
  <p>and when I choose one tag the url will look like this</p>
  
  <pre><code>http://localhost:8080/wordpress/?s=&amp;order=ASC&amp;posts_per_page=10&amp;cat=3&amp;tag=hello
  </code></pre>
  
  <p>Both urls are good but when I choose more than one tag the url became like that.</p>
  
  <pre><code>http://localhost:8080/wordpress/?s=&amp;order=ASC&amp;posts_per_page=10&amp;cat=3&amp;tag=hello&amp;tag=bye
  </code></pre>
  
  <p>You can see the duplicate of the <code>tag=hello&amp;tag=bye</code></p>
  
  <p>This form don't get the result that I want because it must be like this:</p>
  
  <p><code>tag=hello+bye</code></p>