Liquid (Shopify).
Liquid is the template language Shopify themes are built with. It combines HTML with placeholders and simple instructions through which a theme outputs store data such as product name, price, variants or images. Liquid was developed by Shopify and is open source.
Liquid (Shopify) — Explained in Detail
A theme determines how a Shopify store looks. Technically it consists of template files written in Liquid. Liquid is not a full programming language but a template language: it inserts data into HTML and allows simple conditions and loops. Calculating, storing and charging do not happen in Liquid; Shopify handles those in the background.
Liquid has three building blocks. Objects in double curly braces output values, for example {{ product.title }} for the product name. Tags in {% %} control the flow, such as {% if product.available %} for content shown only for products in stock, or {% for variant in product.variants %} for a list of all variants. Filters transform values, for example {{ product.price | money }}, which shows a price in the store's currency format. From these parts come sections and blocks that merchants arrange in the theme editor.
Since the move to 'Online Store 2.0', many templates are JSON files that define which sections appear in which order; the sections themselves remain Liquid. Merchants can therefore assemble pages in the editor without touching code, while developers build new sections with settings. Custom product fields that the theme should display come from metafields.
Liquid is tied to the theme. In a headless store, where the front end is a separate application, Liquid plays no role for the shop pages; data then comes through the Storefront API and pages are built with something like Next.js. For changes within a theme, however, Liquid is the tool of choice: custom sections, corrected structured data or better titles are implemented there.
Liquid, theme and theme editor: who does what
The theme is the package, Liquid the language inside it, the theme editor the interface for merchants. Many changes work in the editor without code: colours, fonts, the order of sections. Liquid is needed when a section is missing, data should be displayed differently or technical details such as structured data are wrong. Code changes belong in a copy of the theme, never directly in the live theme.
Our approach is described under Shopify agency Switzerland.
Example: generating titles from store data
For Racher, in the earlier theme version before the move to a custom front end, we generated short titles for product and collection pages with custom Liquid snippets: from the core of the product name and the brand, with priority for a manually maintained value in a metafield. Not every title had to be written by hand.
The principle carries over to any theme store: Liquid reads existing data and assembles it according to a fixed rule. What matters is a theme copy for testing and a restore point before the change.
Related Page
Shopify agency SwitzerlandIn-depth on the blog
Shopify-Theme oder individuelles Design?Frequently Asked Questions About Liquid (Shopify)
No. Admin and theme editor are enough for day-to-day work. Liquid is only needed for changes the editor does not offer, such as custom sections or corrections to structured data.
No. The theme is the whole appearance with templates, styles, scripts and settings. Liquid is the language the theme's templates are written in.
Not for the actual shop pages, because the front end is a separate application. Liquid may remain only for areas that Shopify still delivers.
More Terms Starting with "L"
LCP (Largest Contentful Paint)
LCP is one of the three Core Web Vitals and measures how long it takes for the largest visible eleme...
Local Pack
The Local Pack (also: Map Pack or Google 3-Pack) is the block in Google search that displays three l...
Lighthouse Score
The Lighthouse Score is a rating from Google that measures the quality of a website in four categori...
Ready for Your Project?
Apply this knowledge to your website — DLM Digital will help you.