Liquid

Liquid templating language, Shopify Liquid, Liquid template engine, Liquid syntax
Liquid is an open-source template language developed by Shopify to render dynamic content in online shops and websites. You use it to display products, collections and customer data.

What is Liquid?

Liquid is an open-source template language developed by Shopify to generate dynamic content in online shops and websites. You write Liquid code in HTML templates, using tags, objects and filters to retrieve and display data from a database. Think of product names, prices, stock status or customer data. Liquid runs server-side, meaning the code is executed before the HTML is sent to the browser. For SME online shops, Liquid is the standard way to customise Shopify themes without touching core functionality.

How Liquid-code works in practice

Liquid uses three types of syntax elements. First, objects, written between double braces such as {{ product.title }}, which retrieve and display data from your database. Second, tags, written between brace percents such as {% if product.available %}, which handle logic and control structures. Third, filters, written with a pipe symbol such as {{ product.price | money }}, which transform or format data. You combine these elements in .liquid files within your theme structure. A typical product page contains dozens of Liquid lines that together provide price display, variant selection, add-to-cart functionality and stock notifications. Shopify's official Liquid documentation describes all available objects and filters.

Why Shopify Liquid developed

Before 2006, online shop platforms often used PHP or other server-side languages directly in templates, which posed security risks when merchants customised code themselves. Shopify wanted to create a secure environment where shop owners could modify templates without access to server-level code. Liquid provides a restricted, controlled syntax that does not allow direct database access or system commands. This allows even non-developers to make modifications safely. Meanwhile, other platforms such as Jekyll and 11ty also use variants of Liquid, but the Shopify implementation remains the most comprehensive. For Dutch online shops, this means you can work with one template language for both your Shopify shop and any content sites running on Jekyll.

What Liquid brings to online shop owners

With Liquid, you customise the presentation of your online shop without touching the underlying Shopify infrastructure. You can personalise product pages based on collection, customer group or stock status. An example: a sports shop displays running shoes differently from cycling shoes by checking for product tags in Liquid and then loading other content blocks. You keep all Shopify updates and security patches because you only change the presentation layer. For SMEs having an online shop created or expanded, Liquid means that developers can quickly add bespoke functionality without building a full bespoke platform. The code remains readable and transferable, which is important if you later switch agencies. In addition, you integrate with API links by combining Liquid with JavaScript for real-time data such as delivery times or dynamic prices.

Applications of Liquid

Liquid comes into play in virtually every customisation of a Shopify online shop, from small text changes to complex product configurators. Below you can see the most common scenarios in which SME online shops deploy Liquid, including situations where alternatives are a better fit.

Dynamic product pages per collection or category

You use Liquid to automatically customise product pages based on the collection a product is in. For example, a furniture shop displays size charts and assembly instructions for cabinets, but delivery time and colour variants for chairs. Instead of adding content manually for each product, write one Liquid template that checks on product.collections and then loads the right content blocks. This saves hours of manual work for online shops with hundreds of products. You define the logic once and Shopify applies it to all relevant products. A common mistake is using too many nested if statements, which makes the code unreadable. It is better to work with Liquid-snippets that you load per product type, so that the main template remains clear.

Customer-specific prices and content via Liquid logic

Wholesale and B2B online shops often show different prices to logged-in customers versus visitors. With Liquid, you check {% if customer.tags contains 'wholesale' %} and show custom prices, bulk discounts or net amounts. You can even hide entire product categories from unauthorised visitors. For example, an installation company hides professional tools from consumers and only shows them to customers with the tag 'professional'. Liquid retrieves customer data from the Shopify customer object, so you don't need an external database. Note that complex discount structures with more than three customer levels become cluttered in Liquid. Then a Shopify app like Bold Custom Pricing or a headless architecture with API integration is more effective. Liquid works best for two to three customer segments with distinctly different price lists.

Multilingual online shops with Liquid-local filters

Shopify Markets en meertalige thema's gebruiken Liquid-filters zoals {{ 'general.search.title' | t }} om vertalingen te laden uit locale-bestanden. Je beheert alle teksten centraal in JSON-bestanden per taal en Liquid kiest automatisch de juiste versie op basis van de klant-locale. Een webshop die zowel Nederland als Vlaanderen bedient, toont 'winkelwagen' versus 'winkelmandje' zonder dubbele templates te onderhouden. Dit werkt ook voor datumformaten, valuta en maateenheden. Je schrijft de Liquid-template één keer en voegt vertalingen toe via het thema-admin-paneel. Voor webshops met meer dan vijf talen wordt het beheer van locale-files complex. Dan is een translatie-app zoals Weglot of Langify handiger, omdat die ook dynamische content zoals productbeschrijvingen automatisch vertaalt. Liquid-locale-filters zijn ideaal voor statische UI-teksten in twee tot vier talen.

When Liquid is the right choice and when it is not

Gebruik Liquid wanneer je binnen de Shopify-omgeving wilt blijven en aanpassingen nodig hebt aan presentatie, logica of content-weergave. Het is de standaard voor thema-ontwikkeling en wordt ondersteund door alle Shopify-apps en -updates. Kies geen Liquid als je complexe real-time berekeningen nodig hebt (zoals verzendkosten op basis van externe API's), want Liquid draait server-side en kent geen asynchrone calls. Ook voor zeer dynamische interfaces met veel interactie is een JavaScript-framework zoals React of Vue effectiever, eventueel in een headless-setup. Liquid combineert goed met maatwerk front-end development voor hybride oplossingen waarin Liquid de basis-rendering doet en JavaScript de interactieve laag verzorgt.

Want to apply this in your company? Monkey Vision helps SME entrepreneurs with web design, SEO and smart digital solutions. Plan a no-obligation discovery call and discover what is possible for you.

Plan a discovery call

Frequently asked questions

No, Liquid is a template language that you combine with HTML and CSS, but it does not replace them. HTML defines the structure of your page, CSS controls the formatting, and Liquid adds dynamic logic. You write Liquid code within HTML files to retrieve and display data from your Shopify database. For example, <h1>{{ product.title }}</h1> combines HTML (the h1 tag) with Liquid (the double braces that retrieve the product title). Without HTML and CSS, Liquid does nothing visible, and without Liquid you only display static content. In practice, you always work with all three simultaneously in .liquid files within your Shopify theme.

Liquid you use for server-side logic that runs before the page is sent to the browser, such as displaying products based on stock or customer group. JavaScript you use for client-side interactivity such as real-time search filters, cart updates without page refresh or external API calls. For a product page that shows different images for each selected variant, Liquid is sufficient. For a live stock check that refreshes every 10 seconds, you need JavaScript. In modern Shopify themes, you combine both: Liquid renders the initial page state, JavaScript adds interaction. An API integration for external data always requires JavaScript because Liquid does not support asynchronous calls. Choose Liquid for content that is fixed at page load, JavaScript for everything that changes after that.

Start by duplicating an existing theme in your Shopify-admin and open the code editor. Start with simple modifications such as text changes in .liquid files under 'Sections' or 'Snippets'. Look for existing Liquid tags in the code and adjust values, for example {{ product.title }} to {{ product.title | upcase }} to enforce uppercase. The Shopify Liquid documentation includes examples by object and filter. Test every change in a development theme before going live. For more complex changes such as new sections or bespoke logic, engage a Shopify developer. Many errors arise from missing closing tags or typos in object names, so always check the syntax before publishing.

The most common mistake is forgetting to close a Liquid tag, for example a {% if %} without an associated {% endif %}, which can break the whole page. A second pitfall is too much nested logic in one template, making the code unreadable and bugs hard to find. Better is to split functionality into reusable snippets. A third mistake is writing object names incorrectly, such as {{ product.name }} instead of {{ product.title }}, which results in empty output with no error message. Always test with different products and collections to find edge cases. Use Shopify's theme checker in the admin to detect syntax errors before going live. When in doubt, consult the official object reference for correct property names.

The best approach depends on your current theme and the complexity of your desired changes. Do you want to get more out of your Shopify online shop but are stuck in the technical possibilities? Schedule a free 30-minute online shop scan with Monkey Vision. We analyse your current theme live, identify which adjustments require Liquid and which are better solved via apps or bespoke. You will immediately receive three concrete improvement points for conversion or usability, plus a realistic estimate of turnaround time and costs. Not a sales pitch, but practical advice based on experience with dozens of Dutch online shops. View our approach via online shop development at Monkey Vision.

About the author

Monkey Vision

Monkey Vision is a full-service digital agency based in London, specialising in web design agency, SEO and AI automation for SMEs. The knowledge base is compiled by our team of online strategists and continuously updated based on current insights.

Publication date: 26-04-2026
Last update: 26-04-2026