4R WordPress Template Hierarchy System

Define Template Hierarchy

Everything that Wordpress displays is based on a template. Themes are basically collections of templates. The Template Hierarchy is the System that WordPress uses to determine the order of template files to use to render individual web pages on a website.

Define/Explain template Hierarchy system - order

The order in which a template is chosen is based on specificity. The most specific template is the one that is used. Take the front page for example. The front page is the first page that a user lands on in a WordPress website. When Wordpress loads the site, it will search in order for front-page.php first. Then it will look for home.php, and if neither of those are found it will load the required core file of index.php.

Define/Explain template Hierarchy system - naming conventions

I think what you're looking for is what order the Hierarchy would use slug vs id. If that's indeed what you're looking for then the answer is that I think Wordpress will use the slug value before the id value. So page-[slug value].php would be displayed before page-[ID #] would.

Summary

Understanding the template hierachy is important. Just in this assignment I had a little difficulty understanding what was going on with the templates and how WordPress chose the page-slug.php to display.