-
What is WordPress Template Hierarchy System?
WordPress Template Hierarchy System is a way to organize how WordPress will work and how a page, or what page will be displayed.This system has an order to what file will be displayed according to what is being requested.If the specific page or file that is being requested is not found, this system would display index.php.
-
WordPress Template Hierarchy System Order
The order of this system is that it first start to load the home page. After the home page there are single pages which are used for posts, and static pages. The following would be archives, then slugs and id. If none of this pages are displayable, if would default back to the main index.php
-
WordPress Template Hierarchy System File Naming Conventions
The difference between the slug and the ID in the file name is that slugs are humanized, or in other words more user friendly. On the other hand, IDs would be the numeric identifier that a pages gets assigned automatically by wordpress.
-
Summary
Understanding the WordPress template Hierarchy system can be confusing, but there are main things to keep in consideration as to how it works. The main thing to understand is that WordPress will look for the most specific file, but if its not found it will move to the next best result, and if nothing is found, it will default back to the main index.php from the template file.