Most pages on your site share the same layout — header, content, sidebar, footer. But a landing page might need no sidebar, a full-width hero, and no navigation at all. That’s when you need custom page templates: alternative layouts you can apply to any page.
This guide explains when you need a custom template, how to create them in block themes and classic themes, how to assign them, and how to keep them maintainable.
If you only need different colors or spacing, block settings or a bit of CSS may be enough — no template required.

With a block theme, you can create a layout visually; distributing it as part of a theme is a separate file-based workflow:
You can also create templates for custom post types and specific pages. More on the Site Editor in Full Site Editing in WordPress: Block Themes Explained.
Classic themes use PHP files. Create the file in your child theme so updates don’t erase it:
<?php
/**
* Template Name: Landing Page
*/
get_header(); ?>
<main class="landing">
<?php while ( have_posts() ) : the_post(); the_content(); endwhile; ?>
</main>
<?php get_footer();
Save it as something like template-landing.php in your child theme folder. The Template Name comment is what makes it appear in WordPress. Child theme basics are in How to Use a Child Theme in WordPress.
In classic themes, the dropdown lives under “Page Attributes.” If your template doesn’t appear, check the file name, the Template Name comment, and that the file is in the active (child) theme folder.
A fast, well-supported host makes every WordPress task smoother. Kawedma WordPress hosting and managed WordPress hosting powered by Rocket.net include staging sites for safe testing, while shared hosting from Hosting.com or Kawedma shared hosting suit smaller sites. Protect the site with an SSL certificate and automatic backups from CodeGuard.
Page templates define how content is presented, while the page record contains the material being displayed. Keep that distinction clear before building. A landing page may need a different surrounding layout, but changing its wording or arranging a few content blocks may not require a new template at all.
Start on staging and define the expected result before editing. Identify which pages should use the layout, which shared elements remain, and what must continue to work. The goal is a maintainable design that supports real content, not a growing collection of almost identical templates with unclear names.
Compare the requirement with existing layouts and block controls. Page templates are useful for structural differences such as a different content frame or selected shared sections. If the change is only a color, spacing value, or reusable content arrangement, a supported style or pattern may be simpler.
Write a short reason for each new layout. Explain which audience or task it serves and why the default is insufficient. This makes later consolidation easier and helps an editor choose correctly without opening several options whose names reveal little about their purpose.
Block themes and classic themes use different template workflows. Page templates created in the Site Editor can be stored as user customizations, while classic layouts usually involve PHP files. Confirm the active theme and the intended maintenance route before copying code from a tutorial designed for another model.
Use the WordPress template handbook to understand block template selection and storage. A user-saved customization can take priority over a theme file, which matters when a developer changes the file but the visible layout appears unchanged. Inspect the current source of the customization before resetting anything.
Decide whether the layout belongs to one specific page or should be selectable for several pages. Page templates that follow an automatic naming rule are not the same as named assignable layouts. Choose the behavior deliberately so a new page does not unexpectedly inherit a special-purpose design.
Keep an assignment register with page IDs, template names, and reasons. When a template is shared, test a change on more than one assigned page. A layout that works for a short campaign page may need adjustment for a long service description using the same template.
Ensure the template displays the actual page content rather than a fixed copy of one page’s text. In block page templates, include the appropriate content block when the layout should render each page’s body. In classic templates, preserve the relevant WordPress loop and the theme’s expected structure.
Review headers, footers, navigation, titles, and shared sections separately. Removing a shared part from one layout is different from editing the shared source. Verify the scope before saving so an intended landing-page adjustment does not alter the main header across the website.
Use page templates with realistic headings, images, long paragraphs, forms, and links. Check narrow screens, enlarged text, keyboard navigation, and visible focus. A template is not accepted merely because an empty preview looks balanced. Its purpose is to display the site’s actual content clearly.
Keep a logical heading structure and useful landmarks. If the design removes navigation, confirm that visitors still have an appropriate route to essential information. Test forms and plugin blocks on the front end, including errors and empty states, rather than reviewing only an ideal successful submission.
Keep custom file changes out of a third-party parent theme that updates automatically. Page templates maintained in a child theme or your own controlled theme need versioning and documentation. Site Editor customizations also need a backup and a clear deployment method because they can live in the database.
When moving a layout between sites, identify dependencies such as plugin blocks, styles, fonts, images, and shared parts. A template file alone may not reproduce the complete design. Test the destination with the required components and use synthetic content before relying on the migration for important pages.
Back up the current layout and record the pages that use it. Before releasing page templates, define how to restore the previous assignment or implementation. Resetting a customized template can discard intentional work, so understand the control and preserve useful changes before using it.
After deployment, verify the public pages as a logged-out visitor. Confirm the correct layout, content, links, forms, and relevant metadata. Record the tested pages and remaining limitations. A successful save in the editor is one step, not proof that the full release works.
| Requirement | Possible approach | Important check |
|---|---|---|
| Different spacing on one page | Supported block or style controls | Avoid changing unrelated global defaults |
| A reusable content section | Pattern with an appropriate sync model | Understand whether instances remain connected |
| A reusable structural layout | Named custom template | Verify assignment and eligible content types |
| One specific page’s automatic layout | Supported template hierarchy rule | Verify the exact match and fallback |
| Reusable application behavior | Maintained plugin implementation | Keep business logic separate from presentation |
This table helps keep page templates focused on layout. Avoid adding a new template for every campaign if one flexible structure can handle the differences through content. Equally, do not force substantially different layouts into a single template full of unexplained conditional behavior.

For a reusable assignable layout, use the custom-template creation path in the installed Site Editor and give it a clear title. Add the required structure and dynamic content blocks, save, and assign it to a staging page. Interface labels may vary, so confirm the selected template’s actual scope.
Test a second page with different content. Page templates should display each page’s own material when that is the intended behavior. If both show identical body text, inspect whether fixed content was placed in the template instead of the dynamic content area.
Keep the save summary in mind when editing shared parts and styles. The session can include several kinds of changes. Review each intended item before saving, and maintain a backup covering both database customizations and theme files.
For a file-based theme implementation, WordPress documents registration through the customTemplates property in theme.json. The registration names the template, supplies a readable title, and can identify eligible post types. The corresponding block markup belongs in the theme’s templates directory.
Merge registration into the existing valid configuration rather than replacing the entire theme.json with a small example. Preserve the theme’s settings and styles, validate the JSON, and use a unique template name. Page templates distributed this way still need their required blocks and shared parts available.
Document how editor customizations and file deployments interact. If a saved user version takes priority, changing the file may not alter the current page. Review the difference deliberately instead of repeatedly deploying the same file or clearing caches without identifying which template source is active.
The earlier PHP example is a minimal illustration, not a complete replacement for a theme’s production layout. Follow the active theme’s conventions and the classic page template documentation. A named template and a file selected by a page-specific hierarchy rule serve different purposes.
Use a filename such as template-landing.php for the assignable example to avoid confusing it with a page-slug convention. Keep the Template Name header and verify that WordPress exposes the intended choice. When customizing a third-party theme, maintain the file in an active child theme rather than editing the parent’s copy.
Do not remove essential theme hooks by replacing the header or footer carelessly. Those structures can be responsible for styles, scripts, accessibility features, and plugin output. If the requirement is a minimal landing layout, implement it through a supported structure and test all required behavior.
Confirm the active theme, file location, registration, eligible post type, and valid syntax. For classic named page templates, check the identifying comment. For block implementations, check the corresponding markup and configuration. A label absent from the selector is a different issue from a selected layout rendering unexpectedly.
If a file change does not appear, inspect user-saved overrides and the selected template before assuming caching is responsible. Page templates can be resolved from more than one layer. Keep a note of the actual active source so another developer can reproduce the diagnosis.
If content disappears, check that the template includes the appropriate dynamic content output. If the layout looks different on the front end, compare loaded styles, plugin dependencies, and the public view. Avoid rebuilding the entire page until the specific mismatch is understood.
Use a fictional campaign page with a long title, a short introduction, a form, and a clear next action. Assign the proposed layout on staging and check it as a logged-out visitor. Confirm that removing a sidebar or navigation element does not remove required contact, policy, or accessibility information.
Test the form’s success and failure states using supported test data. Check that important scripts load and that the page remains usable on narrow screens. Page templates that appear clean can still omit the hook or shared component responsible for a required interaction.
Assign the same layout to a second test page with different content and inspect both. Then change a shared part deliberately and verify its scope. This establishes the distinction between template structure, shared sections, and per-page content before the layout is released.
Measure representative pages under consistent cache and device conditions. A custom template does not automatically make a page faster or slower; the assets, queries, blocks, and integrations matter. Compare the user journey and address a specific finding rather than assuming that a visually simpler page performs better.
Check the visible heading, document title, canonical output, and other metadata supplied by the theme and SEO setup. Page templates should not accidentally duplicate a title or omit required output. Preserve established URLs unless changing them is a separate planned decision with appropriate mapping.
Review structured content and navigation in context. A layout can support clarity, but it does not guarantee search visibility. Keep claims about outcomes tied to evidence and avoid treating the template’s name, number of blocks, or editor score as a ranking promise.
Name page templates by purpose and meaningful differences, such as a narrow article layout or a campaign layout with a minimal header. Avoid a series of unexplained copies. Keep a short description and an assignment list so editors can choose confidently and developers can assess the impact of a change.
Review unused templates before retiring them. Confirm whether a page still references the layout and decide what should replace it. Change assignments deliberately, test the fallback, and retain a recoverable copy until the cleanup is accepted. Deleting an apparently unused file without checking references can alter pages unexpectedly.
Keep repeated structures in shared parts where appropriate. Shared maintenance reduces duplication, but it also increases change scope. Document the relationship and use staging checks on several representative pages whenever a common header, footer, or structural section changes.

Give the implementer representative pages, required behavior, reusable sections, eligible content types, and acceptance checks. Ask which parts live in files and which are saved customizations. Page templates need a deployment and recovery plan that matches those storage locations.
KAWEDMA offers website development and hosting services if you need help building or maintaining the layout. Request a staging demonstration and a concise handover with dependencies, assignments, and recovery steps so the result remains understandable after the initial project.
No. A template describes presentation, while a page is a content record. Create or edit the page separately and assign the intended layout where supported. Check the front end to confirm the page displays its own content through that structure.
Usually that creates unnecessary maintenance. Reuse page templates for genuinely shared structural needs and keep ordinary differences in content or supported styles. Add another layout when its purpose is clear enough that an editor can choose it without guessing.
Keep a backup or export of useful customizations, the current assignment list, and a record of required dependencies. Understand whether reset affects a template, a shared part, or styles. Test the recovery route on staging before using it on important public pages.
We may earn a commission on purchases made through these links, at no extra cost to you.
Don’t miss the chance to participate in the biggest giveaway of this year.