How to Create Custom Page Templates in Shopify 2.0

Share
Why Create Alternate Shopify Templates?
Shopify’s default templates are versatile, but they often can’t handle every unique store requirement. You might need a dedicated landing page with custom sections, a product page layout tailored for subscription vs. one-time purchases, or a collection page with specialized filters and layouts. Alternate templates in Shopify 2.0 make these goals achievable without third-party apps or complex workarounds—giving you flexibility, scalability, and complete creative control.
⚠️ Heads-up Before You Start
Editing your Shopify theme code requires a basic understanding of HTML, CSS, and JavaScript. Always duplicate your theme to create a backup before making any changes.
Method 1: Create a New Template File in Shopify 2.0
From your Shopify admin:
- Go to → Online Store → Themes → Customize
- At the top dropdown, select Products
- Click Create template
- Name it something like custom-product
- Choose “Based on: Default product”
- This creates a new templates/product.custom-product.json file
- Use the theme customize editor to add/remove sections unique to this template
This works for collection, page, and cart templates too—just repeat the steps using the corresponding page type from the dropdown.
Assign Custom Template to Specific Product or Page
Once you've created a new template:
- Go to → Products (or Collections / Pages)
- Open the page you want to preview this template
- Scroll down to the Theme Template setting
- Select the template you created (e.g., product.custom-product)
- Click Save
Now only that product/page uses your alternate layout.
Method 2: Duplicate and Modify Template via Code Editor
If you want more granular control:
- Go to → Online Store → Themes → Actions → Edit code
- Under templates, click “Add a new template”
- Type: product, File Name: custom-template
- Shopify will generate product.custom-template.json
- Next, go to the Sections folder and find main-product.liquid
- Duplicate this file and rename the copy to main-product-custom.liquid
- Open the product.custom-template.json file you created earlier
- Find "main-product" in the JSON and change it to "main-product-custom" so Shopify uses your new section file:
{ "sections": { "main": { "type": "main-product-custom" } }, "order": ["main"] }
Save and test your custom product layout. This method is best for advanced users needing different blocks or structure than the standard theme editor allows.
File Naming Convention
Follow this standard for best theme organization:
Page Type | Template Filename | Section Filename |
---|---|---|
Product | product.custom-template.json |
main-product-custom.liquid |
Collection | collection.custom-template.json |
main-collection-custom.liquid |
Page | page.custom-template.json |
main-page-custom.liquid |
Cart | cart.custom-template.json |
main-cart-custom.liquid |
Real-World Insight
We implemented custom templates for a high-volume skincare brand using Shopify 2.0. Their bundles, subscriptions, and limited-edition drops now each have dedicated layouts. The result? 17% increase in conversion rate and faster load times from skipping unnecessary sections.
Final Thoughts
Creating alternate templates isn’t just a dev trick—it’s a conversion tool. Shopify 2.0 makes it easier than ever to give products, pages, or carts the flexibility they deserve.