Liquid is the templating language Shopify uses to render storefront pages. Every Shopify theme is built on Liquid — from the product page to the cart drawer to the order confirmation email. Understanding how it works gives you the foundation to customise your store intelligently, know when to edit yourself, and know when to call a developer.

The Three Building Blocks of Liquid

Objects output data from Shopify. Wrapped in double curly braces, they render values from your store:

{{ product.title }}
{{ product.price | money }}
{{ shop.name }}

Tags control logic and flow. Wrapped in curly-brace-percent syntax, they handle conditionals and loops:

{% if product.available %}
  
{% else %}
  

Sold out

{% endif %} {% for variant in product.variants %} {% endfor %}

Filters transform output, chained with a pipe character:

{{ product.price | money }}
{{ product.description | strip_html | truncate: 150 }}
{{ 'main.css' | asset_url | stylesheet_tag }}

Theme File Architecture

Understanding which file does what prevents costly mistakes when editing themes:

  • theme.liquid — the master layout file. Every page is wrapped in this. Edit with extreme caution; a syntax error here breaks the entire storefront.
  • Sections — modular, configurable blocks (product-template.liquid, header.liquid, etc.). These are the correct place for most customisations.
  • Snippets — reusable partial templates included with {% render 'snippet-name' %}. Used for repeated UI elements like product cards or icon sets.
  • Templates — define what renders for each page type (product, collection, cart, page, blog). In Online Store 2.0, templates are JSON files that reference sections.

Editing theme.liquid Safely

When adding global scripts, fonts, or structured data, you typically need to edit theme.liquid. Before making any changes: duplicate the theme in Shopify admin and work on the copy, not the live theme. Validate Liquid syntax in the Shopify code editor (it highlights errors in real time). The most common mistake is an unclosed Liquid tag that renders the entire storefront blank.

For complex Liquid customisations or building custom sections from scratch, OneOnic’s Shopify development team can implement changes safely with version control and rollback capability.

Snippets vs Sections vs Layouts: When to Use Each

File TypeUse ForConfigurable in Theme Editor?
SnippetRepeated partial UI (card, icon, form fragment)No
SectionPage-level modules with merchant settingsYes (with schema block)
Layout (theme.liquid)Global wrapper, head, scriptsNo
Template (JSON, OS 2.0)Page type structure (which sections appear)Yes (via theme editor)

When to Hire a Developer vs DIY

You can safely DIY: editing text content and colours via theme settings, reordering sections in the theme editor, adding metafield outputs to a section, and making small CSS tweaks in a section’s style block. You should hire a developer for: creating new sections with custom schema settings, modifying cart or checkout logic, integrating third-party APIs via Liquid, and any change to theme.liquid or global templates.

Frequently Asked Questions

Is Liquid going to be replaced by something else?

Liquid remains the standard for all Shopify theme development and is actively maintained. While Shopify’s Hydrogen framework uses React for headless builds, the vast majority of Shopify stores use Liquid-based themes and will continue to do so. Shopify has no announced plans to deprecate Liquid.

Can Liquid access customer or order data on the storefront?

Yes. Liquid provides access to the customer object (when a customer is logged in), the order object on order confirmation pages, and cart data throughout the storefront. This enables personalised experiences — showing loyalty tier, displaying order history, or customising content based on customer tags — all within standard Liquid without JavaScript.

What is the difference between Online Store 2.0 and legacy Shopify themes?

Online Store 2.0 introduced JSON templates and app blocks, which allow sections to be added to any page type (not just the homepage) and allow apps to inject content via theme app extensions without touching theme code. Legacy themes use Liquid-only templates and require code editing to add sections to non-homepage pages. Any new theme development should target OS 2.0.


Ready to Grow Your Shopify Store?

Our Shopify experts at OneOnic have helped hundreds of brands launch, optimise, and scale. Let’s talk about your project.