WordPress themes have a fairly comprehensive template hierarchy. The template that’s chosen depends on the request. When looking for a template it starts from the left and works its way to the right.
- The template hierarchy is pretty much the same as for existing themes.
Just replace the.php
with.html
. - If it can’t find the most specific template it’ll keep looking.
- eg
category-blocks
then it’ll look forcategory-id
,category
,archive
thenindex
. - Users of a theme can override templates by editing the supplied template in the Site Editor and saving the results in the database. There should be no need to edit the
.html
files using the theme editor. - Custom templates can be specified in the
theme.json
file.