Shopify glossary

Shopify Liquid

Updated By

Short answer

Liquid is the open-source template language Shopify created to build its themes. Every Liquid theme uses it to pull store data, such as product titles, prices and metafields, into pages. It works with three building blocks: objects that output data, tags that add logic like loops and conditions, and filters that format output. Shopify also uses Liquid variations in notification emails and Shopify Flow.

How Liquid works

Liquid sits between your store’s data and the HTML shoppers see. A developer writes a template once, and Liquid fills in the right details for each product, collection or page.

It has three building blocks:

  • Objects output data inside double curly braces, such as {{ product.title }}.
  • Tags add logic inside {% %}, such as showing a badge only when a product is on sale, or looping through a collection.
  • Filters change how output looks, using a pipe, such as {{ product.price | money }} to format a price.

Where Liquid lives in a theme

A Shopify theme is a set of folders, and most of them hold Liquid files:

  • Layout: the outer frame of every page, in theme.liquid.
  • Sections: reusable modules merchants can add and customize in the theme editor.
  • Snippets: small pieces of code reused across the theme, such as a product card.
  • Templates: on Online Store 2.0 themes, most templates are JSON files that simply list which sections appear. The Liquid code lives in the sections.

Shopify also uses variations of Liquid outside themes, including notification email templates, Shopify Flow and order printer and packing slip templates.

Sock Fancy collection pageSock Fancy collection page on mobile
Sock Fancy: we added hover images and variant swatches to its product cards. See the project

When you need Liquid work

You need a Liquid developer when a change goes beyond your theme’s settings. Typical examples are a custom section, new information on product cards, a feature driven by metafields or carrying customizations over to a new theme version. Our theme customization service covers this work, and Online Store 2.0 explains the section-based structure modern themes use.

Questions we get

Do I need to know Liquid to run a Shopify store?

No. On an Online Store 2.0 theme you can add and rearrange sections in the theme editor without touching code. Liquid matters when you want something the theme's settings can't do.

Is Liquid only used by Shopify?

No. Shopify created Liquid and publishes it as an open-source project, and other software projects and companies use it too.

Does a headless Hydrogen store use Liquid?

No. Hydrogen is Shopify's React framework, so a Hydrogen storefront is built in React rather than in a Liquid theme.

Keep reading

Work with us

Need help with theme customization?