Website Building » Shopify » How Do I Create a Custom Template in Shopify?

How Do I Create a Custom Template in Shopify?

Last updated on October 1, 2022 @ 1:48 pm

If you’re running a Shopify store, there’s a good chance you’ll want to customize the look and feel of your site at some point. One way to do this is by creating a custom template. In this article, we’ll show you how to create a custom template in Shopify.

Creating a custom template in Shopify is fairly simple. First, you’ll need to create a new file in the “Templates” directory of your theme. This file should have a “.liquid” extension and contain the following code:

{% layout %}

This code tells Shopify to use the “layout.liquid” file as the base template for this new file. Next, you’ll need to add the following code to the top of your new file:

PRO TIP: If you are not comfortable working with code, we recommend that you reach out to a Shopify Expert to help you with this.

{% include ‘header’ %}

This code includes the “header.liquid” file from your theme, which contains the HTML for your site’s header. You can now add your own HTML code below this line. Be sure to close any HTML tags that you open, and don’t forget to add the following code at the bottom of your file:

{% include ‘footer’ %}

Now that you’ve created your custom template, you can style it using CSS. To learn more about CSS, check out our beginner’s guide.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.