Liquid is Shopify's template language. Tags run logic, filters transform data, objects expose store state. The three primitives, the common patterns, and the gotchas that break themes.
Tags run logic. Filters transform data. Objects expose state.
Shopify Liquid is the template language that every Shopify theme uses to mix store data into HTML. It has three primitives: tags (control flow inside curly-percent delimiters), filters (data transformation inside pipe-chained curly-brace output), and objects (store state like product, collection, cart). Modern themes also lean on sections (reusable template chunks with schema), blocks (reorderable items inside sections), and JSON templates (the 2021 Online Store 2.0 page-composition format). A working Liquid developer in 2026 needs to know all five. The Shopify.dev Liquid reference plus the Dawn reference theme is the fastest learning path; YouTube tutorials from non-Shopify sources miss the updates since 2021.
§ 02 · the three primitives
Tags, filters, objects.
01 · tags
Control flow and logic.
Tags sit inside curly-brace-percent delimiters and make decisions. The core set: if, unless, for, case, assign, capture, render, section, schema. Tags produce no output themselves; they govern what runs. The most useful tag newer Liquid devs miss is render, which loads a snippet in isolation (its variables do not leak out) and is noticeably faster than the older include.
02 · filters
Data transformation.
Filters sit after pipe characters inside double-curly-brace output delimiters. They take whatever came before and transform it: money formats a number as currency, truncate shortens a string, img_url resolves a Shopify CDN URL, escape makes a string HTML-safe, where filters an array. Filters chain; one output can run through five filters in sequence. Most template bugs come from forgetting that filter order matters: escape then truncate is safe; truncate then escape can break mid-entity.
03 · objects
Store state exposed globally.
Objects are the Liquid variables that come pre-populated with store data. The big ones: product, collection, cart, customer, shop, linklists, settings, section, block. Every object has named properties; product.title, product.price, product.variants, product.metafields. Metafields are where custom data lives; the Liquid objects reference documents every property exhaustively.
§ 03 · sections, blocks, JSON templates
Online Store 2.0. The 2021 shift.
Shopify's Online Store 2.0 launch in 2021 introduced sections-everywhere (previously only on the homepage) plus JSON templates. The result: merchants can now build pages by dragging sections together in the theme editor without touching code. For developers, this means page-type templates (product.json, collection.json, index.json) are JSON files listing sections, not Liquid files containing markup. The Liquid lives inside the section files in /sections/; each section has a schema block defining the settings merchants see in the editor.
Sections are reusable Liquid + schema chunks. A hero section, a featured-collection section, a testimonial section. Each has its own schema block declaring settings, blocks, and presets. The Dawn theme on GitHub is the canonical reference.
Blocks are reorderable items inside a section. Cards inside a hero, logos inside a trust bar, slides inside a slideshow. The merchant can add, remove, and reorder blocks without code.
JSON templates live in /templates/ and list which sections render in what order. Changing the order of sections in product.json changes the product page layout without touching any Liquid. This is the mechanism behind the theme editor's drag-and-drop experience.
§ 04 · questions
Five answers.
What is Shopify Liquid?
Liquid is the open-source template language Shopify created in 2006 and now used by many other products. It mixes static HTML with three Liquid primitives wrapped in special delimiters: tags for control flow, filters for data transformation, and objects for store state. Templates rendered through Liquid have access to products, collections, customers, cart, and shop-level data without additional API calls. Liquid is the only templating language Shopify themes can use natively; every theme in the theme store is Liquid. Hydrogen and headless setups use different approaches but the vast majority of Shopify stores run on Liquid.
What is the difference between tags and filters?
Tags control flow and run logic; filters transform data. Tags sit inside curly-brace-percent delimiters (if, for, unless, case, assign, render, section) and produce no output themselves; they decide what happens. Filters sit after pipe characters inside double-curly-brace output delimiters and modify what they receive (uppercase, truncate, money, img_url, escape). A template reads: tags decide whether something shows, filters decide what it looks like when it does. Product.title rendered through the money filter is a filter chain; an if statement wrapping the whole block is a tag. Both are needed constantly.
What are sections, blocks, and JSON templates?
Sections are reusable template chunks with their own schema definition that merchants can edit through the theme editor. Blocks are reorderable items inside a section (cards inside a hero, logos inside a trust bar). JSON templates replaced the older Liquid templates for page types (index.json, product.json, collection.json) as part of Online Store 2.0 in 2021; they list which sections render in what order. The triple gives merchants drag-and-drop page building without editing code. When building a theme in 2026, JSON templates plus section blocks is the default; pure Liquid templates only survive for heavily-customized pages.
Where do I learn Liquid properly?
Three authoritative sources. One, Shopify.dev's Liquid reference documents every tag, filter, and object exhaustively. Two, the Dawn theme (Shopify's reference theme) is the canonical production example; reading its section code is more useful than any tutorial. Three, the Shopify Dev Degree's Liquid tutorials cover the sequencing most self-taught developers miss. Skip YouTube tutorials from non-Shopify sources; Liquid has enough Shopify-specific quirks that general tutorials teach partial truths. Rebuild one section from scratch in Dawn after reading the basics — that reinforces more than passive reading.
What are the common Liquid mistakes?
Five recurring issues. One, loading product data inside a loop causing N+1 queries; use the for-loop with limit and fetch product arrays once. Two, using if-statements inside the liquid file when the schema setting could gate the block (wasted render cost). Three, concatenating strings with plus instead of using the append or concat filters. Four, forgetting that Liquid truthiness treats empty strings and zero as truthy (unlike JavaScript); use blank to check for empty. Five, using image tags instead of image_tag filter; image_tag generates responsive srcset and lazy loading automatically, image tag does not.