Theme Files (hierarchy) /themes/THEME/
style.css ----------Theme styles file (required)
index.php ----------Any page without a template file (required)
front-page.php ----------Front (Home) page
home.php ----------Posts page (or Home page)
functions.php ----------A special file for php functions (code)
404.php ----------Page "not found"
comments.php ----------Comments Template (part)
header.php ----------Site Header Template (part)
searchform.php ----------Search Form Template (part)
sidebar.php ----------Sidebar Template (part)
footer.php ----------Site Footer Template (part)
single.php ----------Post page post_type = post
single-POST_TYPE.php ----------Post page post_type = POST_TYPE
single-POST_TYPE-POST_NAME.php ----------Post page with POST_NAME and POST_TYPE
singular.php ----------Post of any post type
page.php ----------Page post_type = page
page-POST_NAME.php ----------Page post_name = POST_NAME
page-ID.php ----------Page ID = ID
attachment.php ----------Any attachment page
image.php ----------Image attachment page
archive.php ----------Page of any archive
archive-POST_TYPE.php ----------Page of post type archive
search.php ----------Search page
category.php ----------Any Category page
category-SLUG.php ----------Category page with slug = SLUG
category-ID.php ----------Category page with term_id = id
tag.php ----------Any Tag page
tag-SLUG.php ----------Tag page with slug = SLUG
tag-ID.php ----------Tag page with term_id = id
taxonomy.php ----------Any custom taxonomy element page
taxonomy-TAXONOMY.php ----------Page of any term of TAXONOMY taxonomy
taxonomy-TAXONOMY-SLUG.php ----------Page of SLUG term of TAXONOMY taxonomy
author.php ----------Page of Author postsA post template from any file:
<?php
/*
Template Name: My page template
Template Post Type: post, page, product
*/
// … template file code