title: WordPress not using category.php file for custom theme
body: <p>I'm coding a WordPress theme on a staging site and I'm having an issue with having all of my posts display. I've set the static page for the blog to &quot;News&quot; in the setting &gt; Reading option but when I go to the news page, the page is displaying using the index.php file instead of the category.php file that I have created. Template order should have index last if it can't find category or archive is my understanding.</p>
  <p>I'm using the same coding on another site and it works correctly. I've put this new theme on that existing site and it works as it should. They are both on the same hosting company. I started a brand new WordPress instance and it's not working on that new instance either.</p>
  <p>My template for page.php is working fine instead of defaulting to index.php</p>
  <p>Also tried updating permalinks, checked file permissions, checked htaccess file for rewrite conditions.</p>
  <p>So what am I missing?</p>
  <p>category.php code</p>
  <pre><code> &lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
  
      &lt;?php get_template_part( 'template-parts/content-posts', get_post_format() ); ?&gt;
  
    &lt;?php endwhile; else : ?&gt;
  
      &lt;?php get_template_part( 'template-parts/content', 'none' ); ?&gt;
  
    &lt;?php endif; ?&gt;
  
    &lt;?php echo paginate_links(); ?&gt;
  </code></pre>