Templates

Template files are also a part of your theme and play an important role in how the website is displayed to the site visitors. It mainly deals with the website layout and its components. Some examples of the template files are header.phpcomments.php, and index.php.

By the way, the template files in WordPress are reusable. This means that you can use query strings to call a template or a set of templates dynamically. These query strings look for template files with specific names in the current theme’s directory and use the first matching template file as specified by the hierarchy.

Explore these videos for insights and tutorials on Template Files and Template Parts. This section comprises 7 modules with a combined duration of 1 hour 25 minutes.

Video ContentTime
Basic Overview18:53
Template Files10:49
Template Parts05:09
Template Hierarchy06:26
Conditional Tags, Template Tags & Custom Page Templates12:17
Internal Working Pt. 124:59
Internal Working Pt. 207:33

Go through the following handbook pages to learn all about templates and template parts.