Website Building » Shopify » How Do I Change My Shopify Theme Code?

How Do I Change My Shopify Theme Code?

Last updated on January 9, 2023 @ 5:17 pm

There are a few things you need to know before you start changing your Shopify theme code. The first is that Shopify uses a special templating language called Liquid. This means that there are some specific ways that you have to write your code in order for it to work correctly with Shopify. The second is that Shopify’s theme code is stored in what are called “snippets.”

Snippets are small pieces of code that can be reused throughout your theme. They make it easy to keep your code organized and make changes in one place that will be reflected across your entire theme. Finally, it’s important to know that there are two different types of code used in Shopify themes: HTML and CSS. HTML is used for the content on your pages, while CSS is used for the styling of that content.

Now that you know the basics, let’s get started! The first thing you’ll need to do is open up the code editor for your theme.

You can do this by going to the “Edit HTML/CSS” page in your theme settings. Once you’re in the code editor, you’ll see a list of all of the snippets that make up your theme on the left-hand side. To edit a snippet, simply click on it and make your changes in the code editor on the right-hand side.

One of the most common things you’ll want to change in your theme code is the font. This can be done by finding the “fonts” snippet and adding the following line of code:

font-family: "Your Font Name", sans-serif;

Of course, you'll need to replace "Your Font Name" with the actual name of the font you want to use. You can find a list of all of the fonts available on Shopify here: Once you've added this line of code, simply save your changes and refresh your shop to see the new font in action!

PRO TIP: If you are not a web developer or familiar with HTML/CSS, we recommend hiring a Shopify Expert to assist with theme code changes. Making changes to your theme code can result in unintended changes to your live store, and can even break your store if not done correctly.

Changing your shop's colors is another common task that can be accomplished with just a few lines of code. The first thing you'll need to do is find the "colors" snippet and add the following line of code:

color: #000000;>

This will change the color of all of the text on your site to black. Of course, you can replace "#000000" with any hex color code to change the color to anything you want.

If you want to change more than just the color of your text, you can use CSS to style any element on your pages. For example, let's say you want to make all of your headings bold and underlined. You could do this by adding the following CSS rule to your "styles" snippet:

h1, h2, h3, h4, h5, h6 { 
font-weight: bold;
text-decoration: underline;
Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.