Skip to content

How to Create a Custom Template in FSE Themes? ​

A custom template can be applied to the posts or pages you choose. This article explains how to create a custom template using dynamic content from the Otter Blocks plugin to suit any page, and how to use it for a specific page.

In this article

📝 Note: This article uses the Fork FSE theme, but the steps work the same with all Themeisle FSE themes.

Creating the Template ​

  1. Navigate to Appearance > Editor > Templates.

  2. Click Add New and select Custom Template.

  3. Enter a name. The editor opens.

Customizing the Template ​

Every page in a block theme uses a template. The page holds the body you saved in the Gutenberg page editor, while the template supplies the surrounding layout. A block in the template outputs that saved body on the page. If the template omits that output, visitors may not see the body; this does not mean the saved page content was deleted.

A reusable template controls the layout of all pages that use it, so changes to its surrounding sections affect those pages rather than the content saved in each page.

To remove unwanted sections above or below the page content while keeping the content visible:

  1. Navigate to Appearance > Editor > Templates and open the template used by the page for editing. In Neve FSE, for example, this could be Front Page for the homepage or Page for a standard page.
  2. Click the List View icon in the top toolbar to inspect the template's block hierarchy. Click the arrows beside blocks to expand nested blocks until you find the block that outputs the page body.
  3. Keep that output block and any container that holds it. Select only the unwanted surrounding sections in List View and remove them using their block options. Expand each section first so you do not remove a container holding the page-content output.
  4. Save the template, then view an affected page to check that its body appears without the unwanted sections.

Add dynamic content to the template. The following example shows one way to do it.

  1. Insert a dynamic value for the title: add an Advanced Heading block, click the 🔽 icon, and select Dynamic Value. From the list, pick Post Title.

  2. In the same way, add a section block with two columns that display Current Date and Time.

  3. Finally, add the post content dynamic value.

Using the Custom Template ​

After creating and customizing the template, apply it to a page.

Selecting a template changes the layout used to display the page; it does not transfer the page's Gutenberg body into the template.

  1. Navigate to Dashboard > Pages.

  2. Select a page or create a new one.

  3. In the editor, under the Page panel, find the Template field.

  4. Click it and select the custom template you created.

This is how the page looks on the frontend:

Was this helpful?