Shopify Liquid Reference
The official reference for Liquid as used in Shopify themes: every object, tag and filter, with examples. Liquid is the template language that puts store data such as products, collections and carts into a theme's HTML. Keep it open whenever you edit a Shopify theme.
Guide
Web Development
Shopify
Reference
All
Free
What Liquid is
Liquid is a template language created by Shopify. The reference describes it as a way to "create a single template to host static content, and dynamically insert information depending on where the template is rendered". A product page template, for example, is written once and shows the right title, price and images for whichever product a visitor opens. Liquid is also open source on GitHub and used by other software, but Shopify themes add many objects and filters of their own, and that Shopify version is what this reference documents.
How the reference is organised
- Basics: data types, operators, truthy and falsy values, whitespace control and how objects are accessed.
- Tags: logic wrapped in
{% %}, such asif,unless,for,case,assign,capture,renderfor snippets,section,formandpaginate. - Filters: transformations applied with the pipe character, such as
money,image_url,image_tag,date,upcase,defaultandtfor translations. Filters can be chained and some take parameters. - Objects: the store data you output with
{{ }}, such asproduct,collection,cart,customer,shop,requestandsettings. Each object page says where it is available: globally, in certain templates, or through a parent object.
Shopify notes other variations of Liquid exist for notification emails, Shopify Flow, order printer and packing slip templates, which have their own references.
Is it worth your time?
Yes, for anyone touching Shopify theme code. Most small customisation tasks come down to finding the right object and filter: showing a sale badge when compare_at_price is higher than price, looping over a collection's products with pagination, outputting responsive images with image_url and image_tag, or formatting money in the store's currency. The reference answers these faster than forum threads, and it matches the current platform.
How to learn with it
Pair it with the theme architecture docs and a reference theme such as Dawn or Horizon. Open a section file, find each tag, filter and object it uses, and look them up. Then change something small in a development theme with shopify theme dev and watch the result. Theme Check, run with the Shopify CLI, flags deprecated filters and common mistakes.
Prerequisites
HTML and CSS. No prior programming language is required, though experience with any template language or basic JavaScript helps with loops and conditions.
Free or paid
Free. No account needed to read it; a development store is needed to practise.
Common questions
Can Liquid call an external API? No. Liquid runs on Shopify's servers with store data only. For external data, use JavaScript on the page or an app.
Is Liquid on Shopify the same as open source Liquid? The core syntax is the same, but Shopify adds objects, filters and tags that do not exist elsewhere.
Ready to start?
Opens on Shopify in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.