title: Change posts_per_page with button/input
body: <p>I know there's a wordpress stackexchange but yeah, no ones helping.</p>
  
  <p>I was wondering if it was possible to change the number of posts emitted from a custom loop based on a button form?</p>
  
  <p>What I gathered so far (test values):</p>
  
  <pre><code>&lt;form method="post"&gt;
      &lt;button class="amt-button" name="amt_per" value="1"&gt;1&lt;/button&gt;
      &lt;button class="amt-button" name="amt_per" value="3"&gt;3&lt;/button&gt;
      &lt;button class="amt-button" name="amt_per" value="0"&gt;0&lt;/button&gt;
      &lt;button class="amt-button" name="amt_per" value="-1"&gt;all&lt;/button&gt;
  &lt;/form&gt;
  
  
  &lt;script&gt;
  jQuery(document).ready(function($) {
      // Postsperpage
      $('button.amt-button').click(function(){
          $(this).closest('form').submit();
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Also the WP_Query (the $args):</p>
  
  <pre><code>$args = array(
      'post_type'=&gt;'product',
      'posts_per_page' =&gt; $postperpage,
  
      'product_cat'=&gt;'product',
      'product_tag'=&gt;'apparel',
  
      'orderby'=&gt;$orderby,
      'order'=&gt;$order,
      'meta_key'=&gt;$meta_key,
      'paged' =&gt; $paged
  );
  </code></pre>