Templates in WordPress determine the layout of pages, affecting the visual appearance and structure of both individual pages or posts.
To begin, let’s review the most common templates:
- Home template – used when you have set up a default home page.
- Index template – when a Home template is not present, some themes will use the index template as the default home page. Otherwise, it is used to display your latest posts.
- Page template – some themes use the Page template to display the home page. The Page template controls the layout of standard pages of your site, such as an About or Contact page.
- Single template – this template styles your individual blog posts.
- Archive template – is the design for category and other archive pages.
WordPress block themes may include custom templates in addition to the default WordPress templates mentioned above.
For example, the Aquene theme offers not only a Single template that displays a one-column layout but also a variation of the Single template that includes a sidebar.
However, at the moment, WordPress does not provide an option to set a specific template as the default. Hopefully, this will change in future releases of WordPress.
To edit templates in WordPress, use the Site Editor.
Step 1: Access the Site Editor
- Log in to WordPress admin panel.
- Click on Appearance in the left-hand menu.
- Click on Editor to access the Site Editor.
Step 2: Choose the Template to edit
- In the Templates section on the left-hand side of the editor, locate the template you want to edit (e.g., Home, Index, Page, Single, or Archive).
- Click on the template to open it in the editor.
Step 3: Edit the Template layout
- In the main editing area, you will see a series of blocks representing different elements of the template (e.g., header, content, sidebar, and footer).
- Click on a block to select it and reveal its settings in the right-hand panel.
- Modify the block’s settings or add new blocks to customize the layout of the template.
Step 4: Save changes
- Click Save in the upper right corner of the editor.
- In the ‘Save your changes’ panel, review your changes and click on ‘Save’ again to confirm.