If you want to customize your Shopify store beyond what the theme editor allows, you have to learn Liquid. It's the engine that tells your store what to render when a customer lands on a product page or opens their cart.
The Three Building Blocks of Liquid
Liquid code is written inside HTML files (with a .liquid extension). Everything you write in Liquid falls into one of three categories: Objects, Tags, and Filters.
1. Objects (Outputting Data)
Objects tell Shopify to output a piece of data onto the page. They are always wrapped in double curly braces: {{ }}.
<!-- This outputs the title of the current product -->
<h1>{{ product.title }}</h1>
<!-- This outputs the price -->
<p>{{ product.price | money }}</p>
When Shopify renders the page, it replaces the object with the actual data from your store's database.
2. Tags (Logic and Control Flow)
Tags create the logic and control flow for templates. They tell Shopify what to do. They are wrapped in a curly brace and a percent sign: {% %}.
Tags don't produce visible text on the screen. You use them for things like if statements, for loops, and assigning variables.
{% if product.available %}
<button>Add to Cart</button>
{% else %}
<button disabled>Sold Out</button>
{% endif %}
3. Filters (Modifying Output)
Filters modify the output of an object. You apply them using the pipe character | inside an object tag.
<!-- Converts the title to uppercase -->
<h2>{{ product.title | upcase }}</h2>
<!-- Formats a number as a currency string -->
<p>{{ product.price | money_with_currency }}</p>
<!-- Falls back to a default value if the object is empty -->
<p>{{ product.description | default: "No description available." }}</p>
You can chain multiple filters together. They execute from left to right.
Safe Theme Editing in 2026
Never edit your live theme code directly if you can avoid it. The standard workflow is:
- Duplicate the theme: Go to Online Store > Themes > Actions > Duplicate.
- Edit the copy: Make your Liquid changes on the unpublished copy.
- Preview and test: Open the preview link to ensure nothing broke.
- Publish: Once verified, publish the copy to make it live.
If you are a developer, you should use the Shopify CLI to pull the theme locally, track changes in Git, and use a staging store.
How Liquid Interacts with Apps and Widgets
When you install a third-party app (like a chatbot or an onsite conversion agent), it usually injects a script tag into your theme.liquid file.
Modern apps use Shopify Theme App Extensions, which allow you to enable or disable the app via the visual Theme Editor without manually touching the Liquid code. This keeps your theme.liquid clean and prevents leftover code when you uninstall an app.
Further reading
Last updated July 6, 2026.
