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
- home.php
- single.php
- page.php
- archive.php
- search.php
- date.php
- category.php
- author.php
- 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 :

Template Hierarchy in a Image
- Codex – Template Hierarchy
- Codex – Stepping into Templates
Sadish Bala is a guy from India, working as a software engineer in the USA. He has created many popular WordPress themes. You can learn more about him at
