Shopify allows merchants to create custom page templates to customize the look and design of each page. These templates determine how elements like text, images, and other content are organized on the page to create a consistent brand experience for visitors. Custom templates help merchants design a unique layout for a specific page beyond what the default template offers.
Over time, stores may have unused custom templates, which makes it harder to manage and assign them efficiently. Removing these unnecessary templates helps to keep the store's appearance clean and easier to maintain when assigning templates to pages.
What Are Shopify Page Templates?
Shopify Page Templates are pre-defined layout files in the Shopify theme. These templates define the layout and structure of a specific page displayed on the front end of your store. These templates consist of sections and blocks, which are customized and rearranged to create unique page designs.
Each Shopify theme has a set of default templates for various page types like product pages, collections, blogs, and custom pages. Every time you create a new page, it automatically uses a default template from the theme, which defines the page layout, fonts, colors, headers, footers, and other design elements without requiring any coding. Templates manage every element from the header to the footer that you want.
Shopify lets you create multiple versions of the same template. You can have up to 1000 templates in one store to display different pages in various ways by creating new templates based on existing ones. If any changes are made to a specific template, those changes will automatically apply to all pages using that template.
Step-by-Step to Delete Page Template in Shopify?
Before proceeding, there are a few considerations you must follow to ensure everything works well.
Backup Your Theme
Before making any changes, it is good to download a backup of your theme, so that you can restore it if any layout or customizations break.
In the Shopify admin dashboard, navigate to Online Store>Themes. Click three dots before the customize button and select Download theme file to save a copy.
Check Template Status
The template you want to delete is not currently in use on any active page. To check this, go to Online Store>Pages. Open each page to see if the template is used or not.
Steps to Delete Page Template:
1. Access Theme Code Editor
In the Online Store>Theme, click the three dots in the current theme section. Select Edit code to open the theme editor code.
2. Locate and Delete the Template File
In the left sidebar, open the Templates folder. Click on the template file that you want to delete, like page.template.liquid. Click the trash icon. In the dialog, click Delete file.
3. Verify Change
Refresh your store and confirm that the template no longer appears in the Templates folder. Also, preview your store to confirm the update.
4. Test Your Store
After making all the changes, check the pages linked to the template you previously deleted to ensure they function properly.
Is it possible to Restore Deleted Templates in Shopify?
Yes, you can restore a deleted template in Shopify if you have a theme backup. Shopify does not provide any other way to recover deleted theme files, so creating backups is essential. Without backup, you have to create a new page template from scratch.
Can You Delete Default Page Templates in Shopify?
No, you cannot delete default page templates. However, you can override or duplicate them using custom templates with different names.