The Template Hierarchy In Detail
Home Page display
-
- home.php
- index.php
Front Page display
-
- front-page.php (used for both Your latest posts or A static page as set in the Front page displays section of Administration > Settings > Reading)
Single Post display
-
- single-{post_type}.php
- single.php
- index.php
Page display
- Page Templates:
- custom template – Where custom template is the Page Template assigned to the Page.
- page-{slug}.php – If the page slug is recent-news, WordPress will look to use page-recent-news.php
- page-{id}.php – If the page ID is 6, WordPress will look to use page-6.php
- page.php
- index.php
Category display
- Category Templates:
- category-{slug}.php – If the category’s slug were news, WordPress would look for category-news.php
- category-{id}.php – If the category’s ID were 6, WordPress would look for category-6.php
- category.php
- archive.php
- index.php
Tag display
- Tag Templates:
- tag-{slug}.php – If the tag’s slug were sometag, WordPress would look for tag-sometag.php
- tag-{id}.php – If the tag’s ID were 6, WordPress would look for tag-6.php
- tag.php
- archive.php
- index.php
Custom Taxonomies display
-
- taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s slug were someterm WordPress would look fortaxonomy-sometax-someterm.php
- taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php
- taxonomy.php
- archive.php
- index.php
Author display
- Author Templates:
- author-{nicename}.php – If the author’s nice name were rami, WordPress would look for author-rami.php.
- author-{id}.php – If the author’s ID were 6, WordPress would look for author-6.php.
- author.php
- archive.php
- index.php
Date display
- Archive (Date) Templates:
- date.php
- archive.php
- index.php
Search Result display
- Search Templates:
- search.php
- index.php
404 (Not Found) display
- 404 Templates:
- 404.php
- index.php
Attachment display
- Attachment Templates:
- MIME_type.php – it can be any MIME type (image.php, video.php, audio.php, application.php or any other).
- attachment.php
- single.php
- index.php
Resource & More info:
http://codex.wordpress.org/Template_Hierarchy