Template Hierarchy
Learn about the order in which WordPress uses different theme files to render a page on screen.
We'll cover the following...
WordPress uses a template hierarchy which decides which file is used to display a given page. It defines the order in which the file is chosen.
Every page that WordPress shows comes from a template file. The hierarchy decides which file will be used. It has a series of fallback options in case a file is not available. All these fallback options end with index.php
which is a necessary file for all themes. Theoretically speaking, only an index.php
file can be used to create a fully functional theme. However, for ...