How to change the page template in WordPress
Page templates can be applied only to pages, in order to change their aspect. It can be applied to a single page, a page section, or to a group of pages.
Your Theme files should include a default page template (named: page.php). It may also have one or more custom page templates, for instance, to display content in wider columns.
If you need more information about Page Templates, check the following link.
Changing a Page Template
There are 2 scenarios we have to take into consideration:
- first - you want to change the template of an existing page
- second - you want to change the template of a new page
First scenario - existing page
Step 1:
Go to Dashboard > Pages > All Pages.
Step 2:
Go to one of the existing pages that you want to modify and select Quick Edit.
Step 3:
Go to the Templates options (1), choose one of the available templates and click on Update(2).
Once it's done, click on the Apply button (3).
Second scenario - new page
Step 1:
Go to Dashboard > Pages > Add New.
Step 2:
After adding a New Page, it will automatically open the editor.
Go to Page Attributes and expand (1). Then choose one of the options available for the page template (2).
Template Options:
In the following example, we are using the Hestia theme, which has 5 templates available.
Please note that this is specific to Hestia and the number of templates may differ on each theme.
- default template - generates a centered content.
- fullwidth template - generates extended left-right content.
- page with sidebar - you have to select also the direction of the sidebar (2)
- There is at least one custom page template file in your active Theme's folder. If you change your Theme, the page templates in your previously activated Theme will not display.
- You are viewing a screen for editing a Page: page templates are not a default option for posts or custom post types.