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 ecommerce stores 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 ecommerce stores 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 SMB ecommerce stores, Liquid is the standard way to customize 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, ecommerce store platforms often used PHP or other server-side languages directly in templates, which posed security risks when merchants customized 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 ecommerce stores, this means you can work with one template language for both your Shopify store and any content sites running on Jekyll.

What Liquid brings to ecommerce store owners

With Liquid, you customize the presentation of your ecommerce store without touching the underlying Shopify infrastructure. You can personalize product pages based on collection, customer group or stock status. An example: a sports store 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 SMBs having an ecommerce store design or expansion, Liquid means developers can quickly add custom functionality without building a full custom platform. The code remains readable and portable, which is important if you switch agencies later. Additionally, integrate with API links by combining Liquid with JavaScript for real-time data such as delivery times or dynamic pricing.

Applications of Liquid

Liquid comes into play in virtually every customization of a Shopify ecommerce store, from small text changes to complex product configurators. Below you'll see the most common scenarios in which SMB ecommerce stores use Liquid, including situations where alternatives are a better fit.

Dynamic product pages by collection or category

You use Liquid to automatically customize product pages based on the collection a product is in. For example, a furniture store displays size charts and assembly instructions for cabinets, but delivery time and color variations for chairs. Instead of manually adding content for each product, write one Liquid template that checks on product.collections and then loads the appropriate content blocks. This saves hours of manual work for ecommerce stores 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. Better to work with Liquid-snippets that you load per product type, so that the main template remains clear.

Customer-specific pricing and content via Liquid logic

Wholesale and B2B ecommerce stores 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 unauthorized visitors. For example, an installation company hides professional tools from consumers and shows them only 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 such as 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 ecommerce stores with Liquid-local filters

Shopify Markets and multilingual themes use Liquid filters such as {{ 'general.search.title' | t }} to load translations from locale files. You manage all text centrally in JSON files per language, and Liquid automatically selects the correct version based on the customer’s locale. An ecommerce store serving both the United States and Flanders displays β€œwinkelwagen” versus β€œwinkelmandje” without having to maintain duplicate templates. This also works for date formats, currencies, and units of measurement. You write the Liquid template once and add translations via the theme admin panel. For ecommerce stores with more than five languages, managing locale files becomes complex. In that case, a translation app like Weglot or Langify is more convenient, as it also automatically translates dynamic content such as product descriptions. Liquid locale filters are ideal for static UI text in two to four languages.

When Liquid is the right choice and when it is not

Use Liquid if you want to stay within the Shopify environment and need to make adjustments to presentation, logic, or content display. It is the standard for theme development and is supported by all Shopify apps and updates. Do not choose Liquid if you need complex real-time calculations (such as shipping costs based on external APIs), because Liquid runs server-side and does not support asynchronous calls. For highly dynamic interfaces with a lot of interaction, a JavaScript framework such as React or Vue is also more effective, possibly in a headless setup. Liquid combines well with custom front-end development for hybrid solutions in which Liquid handles the basic rendering and JavaScript handles the interactive layer.

Want to apply this to your business? Monkey Vision helps SME entrepreneurs with web design, SEO and smart digital solutions. Schedule a no-obligation meeting and find out what's possible for you.

Schedule an introduction

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 at once 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, shopping cart updates without a page refresh or external API calls. For a product page that shows different images for each selected variant, Liquid is sufficient. For a live inventory 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 pageload, JavaScript for anything 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 capitalization. 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 custom logic, engage a Shopify developer. Many errors arise from missing closing tags or typos in object names, so always check 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 having 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. Want to get more out of your Shopify ecommerce store but stuck in the technical possibilities? Schedule a free 30-minute ecommerce store scan with Monkey Vision. We live analyze your current theme, identify which adjustments require Liquid and which are better solved through apps or customization. You will immediately receive three concrete improvements for conversion or usability, plus a realistic estimate of time and costs. Not a sales pitch, but practical advice based on experience with dozens of Dutch ecommerce stores. Check out our approach via ecommerce store development at Monkey Vision.

About the author

Monkey Vision

Monkey Vision is a full-service digital agency at Nijmegen, specializing in web design, SEO, and AI automation for small and medium-sized businesses. The knowledge base has been compiled by our team of online strategists and is continuously updated based on current insights.

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