An Overview of Block Theme Templates

Brian Gardner Avatar

·

WordPress Block Theme Templates

WordPress 6.0 was recently released and this update brings us closer to a more stable and functional Full Site Editing experience. 

At the highest level, Full Site Editing provides a collection of features that allow users to leverage the editor to build their site from header to footer.

As we enter this new frontier, a unique theme style is being built, taking advantage of everything WordPress offers. For example, block themes use blocks instead of traditional page content for posts and other parts.

This allows users to create layouts with ease and edit every aspect of the website using just one tool. There’s no limit placed on what kind of design element a website can have with block themes.

Templates

Similar to classic WordPress themes, block themes allow for templates to control specific page types on a website. While classic themes have traditionally required .php files, block themes utilizes .html files.

Note: If WordPress can not find an HTML template file, it will try to find a PHP file in your theme folder and use it as a fallback. (Template hierarchy)

Examples of files that work inside of block themes are listed below. These files should be included in a /templates/ folder inside of a theme.

Template Hierarchy

Index (index.html)

Displays posts.

Home (home.html)

Displays posts on the homepage, or on the Posts page if a static homepage is set.

Front Page (front-page.html)

Displays the homepage.

Singular (singular.html)

Displays a single post or page.

Single Post (single.html)

Displays a single post or page.

Page (page.html)

Displays a single page.

Archive (archive.html)

Displays post categories, tags, and other archives.

Author (author.html)

Displays latest posts written by a single author.

Category (category.html)

Displays latest posts in single post category.

Taxonomy (taxonomy.html)

Displays latest posts from a single post taxonomy.

Date (date.html)

Displays posts from a specific date.

Tag (tag.html)

Displays latest posts with a single post tag.

Media (media.html)

Displays individual media items or attachments.

Search (search.html)

Displays search results.

Privacy Policy (privacy-policy.html)

Displays the privacy policy page.

404 (404.html)

Displays when no content is found.