Templates

Templates are the backbone of FSE, providing a standardized structure for different types of content. WordPress uses a template hierarchy to determine which template displays a given page or post. For example, a single post might use the Single Post template, while a blog archive uses the Index template. Understanding this hierarchy is crucial because it ensures that your site maintains consistency while allowing for customization.

Templates are not just a convenience—they are a cornerstone of good design. By using templates, you ensure that typography, spacing, and branding remain consistent across your site, reducing cognitive load for visitors and improving usability. At the same time, FSE allows for controlled flexibility, enabling unique layouts where needed without sacrificing overall coherence. This balance between structure and adaptability is what makes FSE a powerful tool for modern web design.

Template Name Purpose Usage
Index Fallback template for all content types. Displays blog posts archive or homepage when no custom template is applied.
Home Template for the site’s homepage. Used when a static front page is set.
Single Displays individual blog posts. Applies to all single posts unless overridden.
Page Displays individual pages. Used for static content like About or Contact pages.
Archive Displays lists of posts grouped by taxonomy. Used for category, tag, author, or date archives.
Search Displays search results. Used when a user performs a search on the site.
404 Displays error message when a page is not found. Helps guide users back to relevant content.