Site EditorIntermediate

How to edit WordPress templates and reset changes

Edit a WordPress block template, preserve Post Content, create a page-specific layout, and distinguish template resets from global Styles resets.

Documentation checked against WordPress 7.1

A WordPress template controls the structure around content. Changing a shared template can affect many pages. RoarWP's page layouts are content you paste into a page; they are different from these Site Editor templates.

Choose the correct template

Open Appearance → Editor → Templates with a block theme active. Inspect the template for the view you want to change. A single post, an archive and the site's front page can use different templates.

For a page-specific layout, inspect that page's Template setting rather than editing a shared template blindly. Theme-supplied templates vary, and the hierarchy determines which view is used.

Before an important edit, back up the site and export or preserve the existing customization. Record which pages use the template.

Make a small structural change

  1. Open the intended template and use List View to understand the block structure.
  2. Locate the header, the content-rendering block and the footer. A page/post template usually needs Post Content to show the page's or post's writing.
  3. Adjust a Group, spacing or the position of a block. Keep Post Content unless the view deliberately supplies its own content.
  4. If changing a shared template part, remember that the part's other uses can also change.
  5. Select Save, review affected items and verify a public page using the template.

For an archive, a Query Loop and its inner Post Template handle a list of posts. Removing the loop removes that listing. Do not paste ordinary page content over a dynamic view unless that replacement is deliberate.

Create a page-specific template

Use the available add-template control in Templates to create an appropriate custom template, then select it in the intended page's Template setting. Keep content in the page where possible; use the template for its surrounding structure.

Give the template a purpose-based name, such as Wide case study. Preview more than one page before reusing it. A custom template does not automatically become the site's default.

Revert the right layer

For a recent unsaved edit, use Undo. For a customized theme-supplied template, its actions menu can provide Reset. Resetting restores that theme template's default and removes the saved customizations to it. Back up first, inspect the confirmation and reset only the intended template.

A user-created template may have no theme default to restore. Deleting it is a different operation and requires reviewing assigned pages. Do not use deletion as an interchangeable reset.

Global colors and fonts belong to Styles. The Styles panel's Reset to defaults resets those global choices; it does not mean the same thing as resetting one template. Header/footer parts can also carry separate customizations.

If an edit seems missing

Confirm that the page uses the template you edited. A Front Page template can take priority on the homepage. File changes can also be hidden by saved editor customizations. Clear the page cache only after checking the correct template and saved state.

Sources & verification

Sources checked September 17, 2026. Documented behavior is distinct from hands-on testing.