WordPress Template Files List

Template Files List

Here is the list of the Theme files recognized by WordPress. Of course, your Theme can contain any other stylesheets, images, or files. Just keep in mind that the following have special meaning to WordPress — see Template Hierarchy for more information.

The main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.
The rtl stylesheet. This will be included automatically if the website’s text direction is right-to-left. This can be generated using the RTLer plugin.
The main template. If your Theme provides its own templates, index.php must be present.
The comments template.
The front page template.
The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
The single post template. Used when a single post is queried. For this and all other query templates, index.php is used if the query template is not present.
The single post template used when a single post from a custom post type is queried. For example, single-book.php would be used for displaying single posts from the custom post type named “book”. index.php is used if the query template for the custom post type is not present.
The page template. Used when an individual Page is queried.
The category template. Used when a category is queried.
The tag template. Used when a tag is queried.
The term template. Used when a term in a custom taxonomy is queried.
The author template. Used when an author is queried.
The date/time template. Used when a date or time is queried. Year, month, day, hour, minute, second.
The archive template. Used when a category, author, or date is queried. Note that this template will be overridden by category.php, author.php, and date.php for their respective query types.
The search results template. Used when a search is performed.
Attachment template. Used when viewing a single attachment.
Image attachment template. Used when viewing a single image attachment. If not present, attachment.php will be used.
The 404 Not Found template. Used when WordPress cannot find a post or page that matches the query.

Leave a Reply

Your email address will not be published. Required fields are marked *