Liquid basics for developers coming from elsewhere

Themes and storefront 8 min read

A close-up of a notebook with a template structure sketched in pencil beside a keyboard
The language is small on purpose. Learn the edges first.

If you have written templates before, Liquid will take an afternoon. What takes longer is accepting what it will not let you do, because those limits are deliberate and they shape how Shopify themes are built.

This is the orientation we give developers joining a Shopify project from any other stack.

The mental model#

Liquid is a rendering language, not an application language. It has objects handed to it by Shopify, filters to format them, and tags for control flow. There is no database access, no arbitrary computation of consequence, and no way to reach outside the objects you were given. If you need something the object does not contain, the answer is a metafield, an app, or a different page.

Every hour spent trying to make Liquid behave like a general-purpose language is an hour that should have been spent on the data model.

What you will use constantly#

Liquid basics for developers coming from elsewhere — What you will use constantly
ThingWhat it is for
Objectsproduct, collection, cart, customer, shop — the data of the page
FiltersFormatting: money, date, image_url, escape
TagsControl flow: if, for, assign, render
Sections and blocksMerchant-editable structure in the theme editor
MetafieldsYour own structured data attached to Shopify objects

Common traps#

  1. Loops over large collections render slowly; paginate rather than filtering in Liquid.
  2. Anything you compute per request is computed on every request — cache-friendly output matters.
  3. render receives an isolated scope; include is deprecated and behaves differently.
  4. Money is stored in cents; use the money filters rather than doing arithmetic by hand.
  5. Customer-specific content prevents naive full-page caching, which is a performance decision as well as a correctness one.

Where to put logic instead#

Data shaping belongs in metafields and metaobjects, defined once and read cheaply. Behaviour belongs in an app or in the browser. Liquid should mostly read and format. Themes that follow that split stay fast and comprehensible.

Frequently asked questions

Is Liquid hard to learn?

No — a competent developer is productive in a day. Learning what Shopify will not let you do takes longer.

Can I query data in Liquid?

Only what the page object graph gives you, plus metafields. There is no arbitrary querying.

Should logic live in Liquid or JavaScript?

Presentation logic in Liquid, interaction in JavaScript, business rules in an app or in your data model.

shopify liquidliquid templatingshopify theme developmentliquid basicsshopify metafields

All guides

Last updated 2026-08-04 by shopifydevelopment.info · About us

Written by builders

Every guide is written by developers who build and maintain Shopify stores, not spun from other sites.

Reviewed on a schedule

Shopify ships changes constantly. Each guide carries the date of its last review, and we publish the date even when nothing changed.

No paid placements

No app, theme shop, agency or partner can buy a mention, a ranking or a link here.

Twelve languages

Every guide is translated, not machine-popped — each language has its own URL and its own review date.

Limits named

We say plainly what Shopify will not let you change, and when another platform fits your rules better.