In this era of WordPress Block Themes, there are a number of familiar — yet very new — areas of theming that we need to get up to date with. One of those is the concept of block templates.
You see, themes have been able to provide templates for quite a while, but block templates are very different on two main accounts:
In a world where Gutenberg is slowly taking over more and more of the WordPress experience, that experience is not baked into, nor limited by, a theme. Instead, the WordPress experience is empowered by the theme.
And while this is a lot to take in, block templates are an immensely powerful concept that will level-up WordPress publishing.
To get the latest on block templates and full site editing, you’ll need to activate the Gutenberg WordPress plugin, and have a top-level /block-templates/index.html/ file present within your theme. This activates the new Site Editor, as well as enables block templates and block template parts to function properly.
Block templates are familiar in the sense that they leverage the same template file hierarchy we already know. At its core, template hierarchy is the choice-structure WordPress uses to determine what file will be used to generate a given view of a WordPress site.