title: Wordpress use index.php instead of single.php to show post
body: <p>My Wordpress websites are not using single.php to show posts on the website. Every time I open a post, it opens it in index.php.</p>
  
  <p>My single.php looks like this</p>
  
  <pre><code>&lt;?php get_header(); ?&gt;
    &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
      &lt;? echo the_content(); ?&gt;
    &lt;? endwhile; 
    endif; ?&gt;
  &lt;? get_footer();
  ?&gt; 
  </code></pre>
  
  <p>How can I fix this?</p>