Okay
  Print

Creating page templates


Page Templates

You can find your Page Templates by going to the main Editor overview and clicking Templates in the left hand sidebar. From there you can see the templates currently available in the theme.

The default templates are as follows:

  • All Archives: Displays any archive, including posts by a single author, category, tag, taxonomy, custom post type and date. This template will serve as a fallback when more specific templates (e.g. Category or Tag) cannot be found.
  • Blank Canvas: Used for blog posts when you don’t want to follow the default layout and would rather start from scratch. Will display the header, any content you add to the page in a full width layout and the footer.
  • Index: Used as a fallback template for all pages when a more specific template is not defined.
  • 404: Displayed when a page is not found
  • Pages: Default template for all pages. Will display the header, any content you add to the page in a full width layout and the footer.
  • Search results: Displays relevant posts in an archive format after a user search 
  • Single Posts: Template used to display blog posts. WIll generally have the Featured Image at the top, the post’s content in a medium width box, a comments section, post navigation and the footer.

You can edit any of these templates as you see fit but it’s probably best not to alter the Page and Blank Canvas templates as this could adversely affect posts/pages already on the site that have been built using these templates.

Single Post

The template that you are most likely to change is the SIngle Posts template.The main areas you may want to edit are the Hero section and Post Meta (author, category, tags et cetera). When editing this template, you need to make sure that you are using blocks that use dynamic content like Featured Image, Title, Categories as opposed to blocks that use static content like Image and Heading. Generally, blocks that are part of the Theme category as opposed to Text or Media categories.

The one block you have to make sure you have somewhere on the page is Content as this is what pulls in all the blocks you add to the post itself.

You may notice some issues with the comments section in the editor preview but it should be fine on the front end. It’s generally advisable to have a post open in a different window/tab to see the effects of the changes you’re making to the template.

Home & Blog Pages

You can assign your Home and Blog pages by going back to the main WordPress dashboard, clicking on Settings in the right hand sidebar and then Reading. 

You add content to the Home page in the same manner you would any other but the assigned Posts page is slightly different. 

Once assigned in Settings > Reading, you don’t have to add any content to your Blog page as it will pull in the content automatically using the Index template.

You can set a more specific template to be used for your Blog page by going back to Editor > Templates and clicking the Add New Template Button at the top right and then Blog Home

I’d suggest using the Index or All Archives template as a starting point and modifying from there. You can also repeat this process if you want a more specific template to be used for Categories, Authors et cetera.