Templates
Templates are a group of sections that are configured to give your online store a consistent design and feel. The sections that are available in your templates depends on your theme. In the theme editor, you can find which templates are applied to which pages, and then edit the templates to customize the information that you display to your customers.
When you edit a template, your changes apply to every page that uses the template. For example, if you add a newsletter signup form to a collections template, then all your collection pages that use the default collections template display the newsletter signup form.
On this page
Edit your templates
You can edit your templates to add sections to your online store. Some sections contain blocks that can be further customized, but not every section or block has settings or content that can be edited. When you edit your templates, your changes display in real time in the theme editor preview.
Steps:
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Click the Home page drop-down menu, and then select the template that you want to edit.
- To add a new section to the template, click Add section, and then select a new section for your template.
- Optional: To add a block to your new section, click Add block, and then select a new block for your section.
- Click the new section and blocks to view their settings and options, and then make your changes.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Tap the Home page drop-down menu, and then select the template that you want to edit.
- To add a new section to the template, tap Sections > Add section, select a new section for your template, and then tap Add.
- Optional: To add a block to your new section, tap Add block, and then select a new block for your section.
- Tap the new section and blocks to view their settings and options, and then make your changes.
- Tap Save.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Tap the Home page drop-down menu, and then select the template that you want to edit.
- To add a new section to the template, tap Sections > Add section, select a new section for your template, and then tap Add.
- Optional: To add a block to your new section, tap Add block, and then select a new block for your section.
- Tap the new section and blocks to view their settings and options, and then make your changes.
- Tap ✓.
Considerations for creating a new template
Before you create a new template, review the following considerations:
- You can have multiple templates for your products, collections, pages, blogs, and blog posts, but you can have only 1,000 templates in total.
- You can create a new template only with an Online Store 2.0 theme.
- All themes have a default template for collections, products, blogs, blog posts, and pages. These default templates are what your store's resources and content are displayed with, unless you create alternative templates.
- Any changes you make to a template impact all the pages that use that template. If you want to display some pages of a particular type differently, then you can create a new template based on one that already exists in your theme.
- When you create a new template from an existing template, your new template automatically populates with the same sections as your existing template. You can then remove, add, or hide sections, and edit their content as needed, without impacting the display of pages that use the existing template.
Create a new template
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to edit, and then click Customize.
- Click the Home page drop-down menu, select a template type, and then click Create template.
- In the Create a template dialog, do the following:
- In the Name field, enter a unique name for your new template.
- In the Based on drop-down menu, select the existing template that you want to base your new template on.
- Click Create template.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Tap the Home page drop-down menu, select a template type, and then tap Create template.
- In the Create a template dialog, do the following:
- In the Name field, enter a unique name for your new template.
- In the Based on drop-down menu, select the existing template that you want to base your new template on.
- Tap Create template.
Android
- From the Shopify app, tap the ☰ button.
- In the Sales channels section, tap Online Store.
- Tap Manage all themes.
- Find the theme that you want to edit, and then tap Customize.
- Tap the Home page drop-down menu, select a template type, and then tap Create template.
- In the Create a template dialog, do the following:
- In the Name field, enter a unique name for your new template.
- In the Based on drop-down menu, select the existing template that you want to base your new template on.
- Tap Create template.
After you create a new template, you can apply the template to an online store page that you want to use it for.
Create a template for metaobjects
You can create a template for a web page for metaobjects. To use this feature, complete the following steps:
- Create a metaobject definition with Storefront access and, optionally, activate the Web pages feature manually. When you create a theme template, the theme editor activates the Web pages feature.
- Create entries for the metaobject definition.
You can now create a metaobject template in the theme editor.
Previewing templates
You can use template previews to preview how your online store resources, such as products and pages, display to your customers with a different template applied.
Templates are assigned on a product, collection, page, blog, or blog post level. You create and edit templates in the theme editor, but you change a resource's assigned template in your Shopify admin.
Considerations for previewing templates
Consider the following details when previewing templates for your different online store resources:
- When you preview a products template in the theme editor, you can use products that have Active status or Draft status, but you can't preview a product that has Archived status.
- When you preview a collections template in the theme editor, you need to ensure that the collection has Online Store activated as a sales channels. If a collection doesn't have Online Store activated as a sales channel, then you can't preview that collection with any collections templates in the theme editor.
- When you preview a pages template in the theme editor, you can use pages that have their visibility set as either Visible or Hidden.
- When you preview a blog posts template in the theme editor, you can use blog posts that have their visibility set as either Visible or Hidden.
Blogs don't have any different status or visibility parameters, so you can use a blogs template to preview any published blogs that you have in your online store.
Preview an alternate template
You can preview how your products, collections, pages, blogs, or blog posts display with a different template applied.
Steps:
Desktop
- From your Shopify admin, go to Online Store > Themes.
- Find the theme that you want to preview a template with, and then click Customize.
- Click the Home page drop-down menu, and then select the template that you want to use.
- In the Preview section in the theme editor sidebar, click Change.
- Click the resource that you want to preview with the selected template.
iPhone
From the Shopify app, tap the … button.
In the Sales channels section, tap Online Store.
Tap Manage all themes.
Find the theme that you want to preview a template with, and then tap Customize.
Tap the Home page drop-down menu, and then select the template that you want to use.
To select a resource to preview with the template, tap the drop-down menu again.
In the Search online store field, enter the name of the resource that you want to preview with the selected template.
Select your resource from the search results list.
Android
From the Shopify app, tap the ☰ button.
In the Sales channels section, tap Online Store.
Tap Manage all themes.
Find the theme that you want to preview a template with, and then tap Customize.
Tap the Home page drop-down menu, and then select the template that you want to use.
To select a resource to preview with the template, tap the drop-down menu again.
In the Search online store field, enter the name of the resource that you want to preview with the selected template.
Select your resource from the search results list.
Apply a new template
You can change an assigned template for the following sections in a published theme:
- pages
- products
- collections
- blogs
- blog posts
You change an assigned template in your Shopify admin. The template options that display are based on the available templates only in your current live theme.
Templates for products and collections can be assigned on an individual item level, or to multiple items at the same time using the Bulk editor.
Apply a new template to a page
Desktop
- From your Shopify admin, go to Online Store > Pages.
- Click the page that you want to apply a new template to.
- In the Online store section, click the Theme template drop-down menu, and then select the template that you want to apply to your page.
- Click Save.
iPhone
- From the Shopify app, tap the … button.
- In the Sales channels section, tap Online Store.
- Tap Pages.
- Tap the page that you want to apply a new template to.
- In the Online store section, tap the Theme template drop-down menu, and then select the template that you want to apply to your page.
- Tap Save.
Android
- From the Shopify app, tap the