title: Wordpress - How to set different posts per page number for two different categories?
body: <p>On my Wordpress website I have two categories: <strong>news</strong> and <strong>club</strong>. How to set number of posts per page to 10 for <strong>news</strong> category and 4 posts per page for <strong>club</strong> category?</p>
  
  <p>I have set number of posts per page in Settings > Reading to 10 and <strong>news</strong> works as I want but not <strong>club</strong></p>
  
  <p>I have custom loop in club category where I set posts_per_page to 4.
  In category-club.php I have</p>
  
  <pre><code>$args=array(
      'category_name'=&gt;'club',
      'post_type' =&gt; 'post',
      'post_status' =&gt; 'publish',
      'posts_per_page' =&gt; 4,
      'orderby' =&gt; 'date',
      'order' =&gt; 'desc',
      'paged' =&gt; ((get_query_var('paged')) ? get_query_var('paged') : 1)
    );
  </code></pre>
  
  <p>But there is problem when I switch to page 2 of posts in this category. I get 404 error. I think it's because I have less than 10 posts in this category.</p>
  
  <p>Can anyone tell me what should I do to get second and next pages work?</p>