What should I put on my index.php?

I had covered basically all the pages listed in the Template Hierarchy:

404_template
archive_template
author_template
category_template
tag_template
taxonomy_template
home_template
front_page_template
page_template
search_template
single_template
attachment_template

I’m using the front-page.php for my static front page and home.php for by blog index. So, with all that covered, what should I put into my index.php? Or can I leave it empty?

Related posts

Leave a Reply

1 comment

  1. index.php is shown whenever wordpress doesn’t find an appropriate page template. Generally people use it as the template for their site’s blog. If you are absolutely sure that it will never be reached, you can leave it empty. Just make sure you have that file present, otherwise the theme will not work

    As a personal preference, when coming across this kind of situation, i just rename one of archive.php or home.php to index.php which will work just as well for almost all of the situations