title: Wordpress category.php Pagination 404 Errors
body: <p>I'm trying to display posts for categories in my category.php file with pagination, but when I click the "older posts" button, I'm getting a 404. Here's the code I'm currently using for the query:</p>
  
  <pre><code>&lt;?php
  
      // Get ID of category we're currently looking at
      $cat = get_cat_id( single_cat_title("",false) );
  
      query_posts(array(
          'posts_per_page'=&gt;25,
          'cat' =&gt; $cat,
          'paged' =&gt; ( get_query_var('paged') ? get_query_var('paged') : 1 )
      ));
      if(have_posts()):
  ?&gt;
  </code></pre>
  
  <p>The permalink structure I'm using is /%category%/%postname%/</p>
  
  <p>I've read that there is a bug that will leave you with a 404 error if the "posts_per_page" is set to less than the default, but that doesn't seem to be the issue. The default in my settings is 20.</p>
  
  <p>Any ideas? Is this an issue with the permalink settings? Shouldn't having /category-name/page/2 work the same way as /blog-page/page/2 works?</p>
  
  <p>I also get a 404 if I try to access categories like this: /category/cat-name, or /blog-page/category/cat-name</p>
  
  <p>Thanks!</p>