Skip to Content
DocsOnFlowDefault Templates

Default Templates

While Ghost allows you to select different templates for individual posts, there’s no built-in way to change the default template for all posts. This guide explains how to modify your theme files to make a custom template the default for all posts.

Understanding the Issue

Ghost themes typically include several post templates that you can select from the post editor:

Ghost post template selection

However, if you want to use a custom template (like custom-post-classic.hbs) as the default for all posts without selecting it manually each time, you’ll need to modify your theme files.

Changing the Default Post Template

To change the default template for all posts, you’ll need to edit your theme code:

  1. Locate the main post template file (post.hbs)
  2. Find the custom template file you want to use as default (e.g., custom-post-classic.hbs)
  3. Replace the content of post.hbs with the content from your desired template

Editing Theme Files

To edit the theme files, follow these steps:

  1. Download a copy of the theme and unzip the theme archive
  2. Use a code editor of your choice (such as Visual Studio Code or Sublime Text) to make the changes
  3. Locate the post.hbs file (this is the default post template)
  4. Also locate your desired template file (e.g., custom-post-classic.hbs)
  5. Make a backup copy of the original post.hbs file
  6. Copy the entire content from your custom template file
  7. Paste it, replacing all content in the post.hbs file
  8. Save the changes
  9. Re-zip the theme directory and upload it to your Ghost site

For detailed instructions on how to edit theme code, re-zip, and upload the modified theme, refer to the Editing Theme Code article.

When to Use This Method

Consider changing the default post template when:

  • You consistently use the same custom template for most posts
  • You want to maintain a consistent look across all posts
  • You want to save time by avoiding manual template selection for each post

By following these steps, you can customize the default appearance of all posts on your Ghost site without having to select a template for each new post.