Other files in a theme

Yes.

You might see some more files as part of a theme. Although these files are optional, they help in giving a better user experience to the visitor of your site.

Those files are

  1. home.php
  2. single.php
  3. page.php
  4. archive.php
  5. search.php
  6. date.php
  7. category.php
  8. author.php
  9. 404.php

Remember these are all optional files in a theme, some themes might include them while others choose to ignore these files. When any of these files are not there, WordPress will load the “index.php”.

Home Page View : home.php

When a browser requests the home page of a website, WordPress will try to load home.php if found within the theme. if not found, it will load the index.php.

Single Post View : single.php

When a user clicks on a permalink to single post, then WordPress will try to load this single.php. if not found, it uses the index.php

Page View : page.php

When a user clicks on a page [like about page, contact page etc] in your website, then WordPress will load page.php and if not found, it loads the index.php

I think you got the idea now. right ? you can jump to the next part or do some further reading below.

Further Reading :
wp_template_hierarchy.png
Template Hierarchy in a Image

  1. Codex – Template Hierarchy
  2. Codex – Stepping into Templates

Please use the sidebar for navigating within the Book.