Should I use template files or just use conditional tags in index.php?

Actually, a theme only needs 3 core files to be recognized as a proper theme. These files are:

  • index.php
  • styles.css
  • functions.php

If you have these 3 files in your theme’s folder, you are good to go. The point of having multiple template files is to open a way for developers and users to customize their content output. You don’t have to do this, but I strongly suggest that you add specific template files at least for the following:

  • 404.php
  • search.php
  • single.php
  • archive.php
  • comments.php
  • page.php

You never know what happens in the future. You might use a hundred conditionals in your index.php file, and then need a single.php tomorrow. Better to be prepared in the first place.