Templates in WordPress

Banner for article about templates in WordPress

Templates in WordPress determine the layout of pages, affecting the visual appearance and structure of both individual pages or posts.

Common templates

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.

Additional templates

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.

Edit templates

To edit templates in WordPress, use the Site Editor.

Step 1: Access the Site Editor

  1. Log in to WordPress admin panel.
  2. Click on Appearance in the left-hand menu.
  3. Click on Editor to access the Site Editor.

Step 2: Choose the Template to edit

  1. 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).
  2. Click on the template to open it in the editor.

Step 3: Edit the Template layout

  1. 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).
  2. Click on a block to select it and reveal its settings in the right-hand panel.
  3. Modify the block’s settings or add new blocks to customize the layout of the template.

Step 4: Save changes

  1. Click Save in the upper right corner of the editor.
  2. In the ‘Save your changes’ panel, review your changes and click on ‘Save’ again to confirm.