The Ultimate Guide to Theme Template Files in WordPress

The Ultimate Guide to Theme Template Files in WordPress

If you’ve ever delved under the hood of a WordPress theme, you’ll know that it contains four kinds of files: the stylesheet, the functions file, a number of template parts, and one or (most likely) more template files.

For a theme to work, it must have at least two files: the stylesheet and an index.php template file. But most themes will have more template files than that, each of which is designed to display different kinds of content.

In this post, I’ll explain which template files do what and how WordPress decides which template file to use when displaying a given page on your site.

The Kinds of Template File

There are six kinds of template…

Read Full Article