![]() ![]() But which page is this, specifically? It depends on your site’s settings in Settings > Reading: This is the page on your website that displays your most recent Posts. Let’s take a second trip through the template hierarchy, this time with the site’s blog index page. This chapter explains how the template hierarchy makes its decisions. The template hierarchy is a built-in system in WordPress that specifies which line to send a given bundle of posts down, based on properties of the bundle itself. How do we know which assembly line a given bundle will go down? With the WordPress template hierarchy. Putting our posts through index.php will result in a webpage that looks one way putting it through home.php, archive.php, or page.php will give very different results. ![]() However, the theme provides a lot of possible lines to send those posts down: our different PHP templates. In this chapter, we’re in the stage of the production process where a bundle of posts has been fetched out of the warehouse (the database), and are all ready to be assembled and made to display beautifully by our assembly line, the WordPress theme. Learning this hierarchy will let you pinpoint which of your webpages will use which template.Īs we work through this chapter, remember the following analogy: WordPress is a factory that processes raw material, posts, into finished products, webpages. The template hierarchy follows a defined order set in WordPress itself.The WordPress template hierarchy determines which PHP template files will be used to construct a given webpage on your site, based on the type of post content requested: for example, whether the webpage displays a Page, a Post, or an archive of many Posts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |