{"id":14354,"date":"2023-05-22T12:58:17","date_gmt":"2023-05-22T12:58:17","guid":{"rendered":"https:\/\/shopthemedetector.com\/blog\/?p=14354"},"modified":"2026-11-23T09:53:35","modified_gmt":"2026-11-23T09:53:35","slug":"shopify-liquid","status":"publish","type":"post","link":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/","title":{"rendered":"Shopify Liquid: Objects, Tags, Filters and Code Examples"},"content":{"rendered":"<p>Shopify Liquid is the template language built into every Shopify theme. When a customer opens a product page, cart, or blog post, Liquid reads your store&#8217;s data and fills in the page before it reaches the browser. No request ever sends a Liquid tag to the customer&#8217;s screen - the server renders it and delivers finished HTML.<\/p>\n<p>This guide explains what Liquid does, how the files fit together, and covers the objects, tags, filters, and code examples you need to work with Shopify themes confidently.<\/p>\n<div class=\"key-takeaways\"><div class=\"takeaways-title h2\">Key Takeaways<\/div><div class=\"takeaway-item\"><div class=\"takeaway-number\">1<\/div><div class=\"takeaway-text\">Liquid runs on Shopify&#8217;s servers, not in the browser - the customer sees finished HTML, not template code.<\/div><\/div><div class=\"takeaway-item\"><div class=\"takeaway-number\">2<\/div><div class=\"takeaway-text\">Every Shopify theme is made of four file types: layout files, template files, section files, and snippets.<\/div><\/div><div class=\"takeaway-item\"><div class=\"takeaway-number\">3<\/div><div class=\"takeaway-text\">Objects pull store data like titles and prices; tags add logic like loops and conditions; filters format the output.<\/div><\/div><div class=\"takeaway-item\"><div class=\"takeaway-number\">4<\/div><div class=\"takeaway-text\">The date filter and the money filter are the two most-used filters in real Shopify themes.<\/div><\/div><\/div>\n<h2>What is Shopify Liquid?<\/h2>\n<p>Shopify developed Liquid in 2006 as an open-source templating language for building online store themes. For Shopify specifically, Liquid is what connects raw store data, products, prices, collections, customer accounts, and cart contents to the HTML that customers see.<\/p>\n<p>The language has three moving parts:<\/p>\n<ul>\n<li><strong>Objects<\/strong> output data. <code>{{ product.title }}<\/code> prints the product&#8217;s name wherever you place it.<\/li>\n<li><strong>Tags<\/strong> control logic. <code>{% if product.available %}<\/code> shows content only when the condition is true.<\/li>\n<li><strong>Filters<\/strong> format output. <code>{{ product.price | money }}<\/code> turns a raw number into a currency string.<\/li>\n<\/ul>\n<p>All three work together inside <code>.liquid<\/code> files stored in your theme&#8217;s code. The Liquid engine processes these files on Shopify&#8217;s servers each time a page is requested, then sends the finished HTML to the browser.<\/p>\n<h2>How Liquid files are organized in a Shopify theme<\/h2>\n<p>A Shopify theme is a folder of Liquid files, each with a specific job. Understanding the four file types makes it much easier to know where to look when you want to change something.<\/p>\n<p><strong>Layout files<\/strong> (<code>layout\/<\/code>) form the outer frame that wraps every page. <code>theme.liquid<\/code> is the main one - it contains the <code>&lt;html&gt;<\/code>, <code>&lt;head&gt;<\/code> and <code>&lt;body&gt;<\/code> tags and uses <code>{{ content_for_layout }}<\/code> to pull in whatever the current page template produces.<\/p>\n<p><strong>Template files<\/strong> (<code>templates\/<\/code>) control what shows on each page type. <code>product.liquid<\/code> handles product pages, <code>collection.liquid<\/code> collection pages, and <code>cart.liquid<\/code> the cart. Modern Shopify themes also support JSON templates (<code>product.json<\/code>) that reference sections instead of writing markup directly.<\/p>\n<p><strong>Section files<\/strong> (<code>sections\/<\/code>) are content blocks that merchants can add to any page from the Theme Editor. Each section file contains a <code>{% schema %}<\/code> tag that defines the settings a merchant can change, things like a heading, a color, or a layout option.<\/p>\n<p><strong>Snippets<\/strong> (<code>snippets\/<\/code>) are small reusable pieces of code included with <code>{% render 'snippet-name' %}<\/code>. A product card, an icon, or a form field might each live in its own snippet so the same code can be used across multiple templates without duplication.<\/p>\n<h2>Shopify Liquid objects<\/h2>\n<p>Objects are the data layer of Shopify Liquid. Each object represents a piece of your store - a product, a collection, the customer, the cart - and you access its properties using dot notation inside double curly braces.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ product.title }}<\/pre>\n<p>Products have dozens of properties. These are the ones used most often in theme templates:<\/p>\n<ul>\n<li><code>product.title<\/code> - the product name<\/li>\n<li><code>product.price<\/code> - price in cents (use with the <code>money<\/code> filter to format it)<\/li>\n<li><code>product.description<\/code> - the full HTML description<\/li>\n<li><code>product.available<\/code> - true if any variant is in stock<\/li>\n<li><code>product.images<\/code> - an array of product images<\/li>\n<li><code>product.url<\/code> - the product&#8217;s URL relative to the store<\/li>\n<\/ul>\n<p>Other common top-level objects include <code>collection<\/code>, <code>cart<\/code>, <code>customer<\/code>, <code>shop<\/code>, <code>article<\/code>, <code>page<\/code>, and <code>settings<\/code> (for global theme settings). Inside section files you also have <code>section.settings<\/code> for the settings a merchant configured in the Theme Editor, and <code>block.settings<\/code> for the settings on individual theme blocks.<\/p>\n<p>For example, to display a product&#8217;s price formatted as money:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ product.price | money }}<\/pre>\n<h2>Shopify Liquid tags<\/h2>\n<p>Tags control how your theme behaves. They handle conditionals, loops, variable assignments, and other logic. Tags use curly brace and percent symbols and do not produce any visible output themselves.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% if product.available %}\n  Add to cart\n{% else %}\n  Sold out\n{% endif %}<\/pre>\n<p>The most common tags in Shopify themes:<\/p>\n<ul>\n<li><strong>if \/ elsif \/ else \/ endif<\/strong> - conditional content<\/li>\n<li><strong>unless \/ endunless<\/strong> - the inverse of if (show unless condition is true)<\/li>\n<li><strong>for \/ endfor<\/strong> - loop over an array<\/li>\n<li><strong>assign<\/strong> - create a variable<\/li>\n<li><strong>capture \/ endcapture<\/strong> - save a block of rendered content to a variable<\/li>\n<li><strong>render<\/strong> - include a snippet file (the modern replacement for the deprecated include)<\/li>\n<li><strong>comment \/ endcomment<\/strong> - a note that does not render on the page<\/li>\n<li><strong>paginate \/ endpaginate<\/strong> - split long product or article lists across multiple pages<\/li>\n<\/ul>\n<p>Loop tags support extra controls: <code>limit:<\/code> caps how many items render, <code>offset:<\/code> skips a number of items, and <code>break<\/code> and <code>continue<\/code> exit or skip iterations early. For example, to show just the first 4 products in a collection:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% for product in collection.products limit: 4 %}\n  {{ product.title }}\n{% endfor %}<\/pre>\n<h2>Shopify Liquid filters<\/h2>\n<p>Filters modify values before they are output. You chain them after a pipe symbol (<code>|<\/code>) inside double curly braces, and you can stack multiple filters in a row - the output of each one feeds into the next.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ product.title | upcase | truncate: 40 }}<\/pre>\n<p>That example converts the title to uppercase and trims it to 40 characters. Common filters:<\/p>\n<ul>\n<li><strong>money<\/strong> - formats a cents value as a currency string using your store&#8217;s currency settings<\/li>\n<li><strong>date<\/strong> - formats a timestamp (see the date cheat sheet below)<\/li>\n<li><strong>upcase \/ downcase<\/strong> - changes string case<\/li>\n<li><strong>truncate<\/strong> - shortens a string to a character limit<\/li>\n<li><strong>default<\/strong> - returns a fallback when the value is blank or nil<\/li>\n<li><strong>image_url<\/strong> - generates a resized image URL for a Shopify image object<\/li>\n<li><strong>append \/ prepend<\/strong> - adds text to the end or start of a string<\/li>\n<li><strong>size<\/strong> - returns the number of items in an array or characters in a string<\/li>\n<li><strong>where<\/strong> - filters an array to items where a property matches a value<\/li>\n<li><strong>asset_url<\/strong> - returns the URL of a file in your theme&#8217;s assets folder<\/li>\n<\/ul>\n<h2>Practical Shopify Liquid examples<\/h2>\n<p>Here are five patterns used in real Shopify themes, covering the most common tasks.<\/p>\n<p><strong>1. Display product details<\/strong><\/p>\n<p>Output a product&#8217;s title, price and description from within any product template file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"><!-- Product Title -->\n{{ product.title }}\n\n<!-- Product Price -->\n{{ product.price | money }}\n\n<!-- Product Description -->\n{{ product.description }}<\/pre>\n<p><strong>2. Customize layouts based on conditions<\/strong><\/p>\n<p>Use an if statement to change what renders based on a product&#8217;s type, availability, or any other property.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% if product.type == 'Shirt' %}\n  <!-- Liquid code for the Shirt category header goes here -->\n{% elsif product.type == 'Pants' %}\n  <!-- Liquid code for the Pants category header goes here -->\n{% else %}\n  <!-- Liquid code for the default header goes here -->\n{% endif %}<\/pre>\n<p><strong>3. Iterating over collections<\/strong><\/p>\n<p>A for loop steps through every product in a collection and outputs whatever you specify for each one.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% for product in collection.products %}\n  {{ product.title }}\n  {{ product.description }}\n{% endfor %}<\/pre>\n<p><strong>4. Personalize for logged-in customers<\/strong><\/p>\n<p>Shopify&#8217;s customer object is only available when a customer is logged in, so wrap it in an if check to avoid errors on pages viewed by guests.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% if customer %}\n  Welcome back, {{ customer.first_name }}!\n{% endif %}<\/pre>\n<p><strong>5. Format and transform data<\/strong><\/p>\n<p>Chain filters to control exactly how a value appears on screen.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"><!-- Convert a product title to uppercase -->\n{{ product.title | upcase }}\n\n<!-- Format a date -->\n{{ article.published_at | date: \"%b %d, %Y\" }}<\/pre>\n<h2>Debugging Shopify Liquid<\/h2>\n<p>Liquid fails silently by default: undefined variables output an empty string rather than an error message, and a typo in an object name simply produces nothing on screen. Here are the main techniques for finding and fixing problems in Liquid code.<\/p>\n<p><strong>Output a variable as JSON<\/strong><\/p>\n<p>Add <code>{{ variable | json }}<\/code> anywhere in a template to print the full contents of a Liquid object to the page. This is the fastest way to check what data is actually available in context:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ product | json }}<\/pre>\n<p>That prints every property on the product object so you can see exactly which keys exist and what values they hold. Remove it before publishing to your live store.<\/p>\n<p><strong>Use the Shopify CLI for live error output<\/strong><\/p>\n<p>Running <code>shopify theme dev<\/code> starts a local preview of your theme and prints Liquid rendering errors to the terminal as they happen. Errors that would be silent on the live store appear as explicit messages in the CLI output, including the file name and line number. This is the most reliable way to catch syntax errors.<\/p>\n<p><strong>Stop Liquid from processing a block<\/strong><\/p>\n<p>The <code>{% raw %}<\/code> tag prevents Liquid from interpreting anything inside it, which is useful when you need to display Liquid syntax as literal text rather than run it:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% raw %}\n  {{ product.title }} will not be rendered as Liquid here\n{% endraw %}<\/pre>\n<p><strong>Catch undefined values with the default filter<\/strong><\/p>\n<p>When a property might not exist for every product or page, the <code>default<\/code> filter returns a fallback instead of leaving the space blank:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ product.vendor | default: \"Our brand\" }}<\/pre>\n<p>This is particularly useful for optional metafields or properties that only some products have set.<\/p>\n<p><strong>Use comments to temporarily reveal values<\/strong><\/p>\n<p>To debug without showing raw output to visitors, wrap the JSON output in a comment tag and view the page source rather than the rendered page:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{% comment %}{{ product | json }}{% endcomment %}<\/pre>\n<p>The value does not render visually but appears in the HTML source when you view it in the browser&#8217;s developer tools.<\/p>\n<h2>Best practices for Shopify Liquid<\/h2>\n<p>A few habits make Liquid code easier to maintain and edit later.<\/p>\n<ul>\n<li><strong>Use consistent indentation.<\/strong> Liquid files mix HTML and template logic. Keeping indentation consistent inside loops and conditionals makes the structure obvious at a glance.<\/li>\n<li><strong>Prefer <code>render<\/code> over <code>include<\/code>.<\/strong> The <code>render<\/code> tag creates a separate scope, so variables in the parent do not leak into the snippet. <code>include<\/code> is deprecated in Online Store 2.0 themes.<\/li>\n<li><strong>Keep logic out of templates.<\/strong> Liquid is for display, not computation. If you need complex conditional logic, simplify it into a boolean or a named variable with <code>assign<\/code> rather than nesting many conditions inline.<\/li>\n<li><strong>Use comments for context, not narration.<\/strong> <code>{% comment %}{% endcomment %}<\/code> blocks are stripped at render time and add no page weight. Use them to explain non-obvious decisions, not to describe what obvious code does.<\/li>\n<li><strong>Test on a development theme.<\/strong> Shopify lets you duplicate any theme before editing. Make changes on the duplicate first so the live store is not affected while you work.<\/li>\n<li><strong>Use limit on large loops.<\/strong> Loops that iterate through hundreds of products on a single page create slow render times. Use <code>limit:<\/code> and <code>paginate<\/code> to keep pages fast.<\/li>\n<\/ul>\n<h2>Cheat Sheet: Quick Reference for Shopify Liquid<\/h2>\n<p>The tables below cover the most-used objects, tags, filters, and date format codes in Shopify theme development.<\/p>\n<h3>Common Liquid objects<\/h3>\n<p>Objects output store data. Wrap them in double curly braces.<\/p>\n<table>\n<thead>\n<tr>\n<th>Object<\/th>\n<th>What it outputs<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>{{ product.title }}<\/code><\/td>\n<td>The product&#8217;s name<\/td>\n<\/tr>\n<tr>\n<td><code>{{ product.price | money }}<\/code><\/td>\n<td>The product price, formatted as money<\/td>\n<\/tr>\n<tr>\n<td><code>{{ collection.title }}<\/code><\/td>\n<td>The current collection&#8217;s name<\/td>\n<\/tr>\n<tr>\n<td><code>{{ cart.item_count }}<\/code><\/td>\n<td>Number of items in the cart<\/td>\n<\/tr>\n<tr>\n<td><code>{{ customer.first_name }}<\/code><\/td>\n<td>The logged-in customer&#8217;s first name<\/td>\n<\/tr>\n<tr>\n<td><code>{{ shop.name }}<\/code><\/td>\n<td>Your store&#8217;s name<\/td>\n<\/tr>\n<tr>\n<td><code>{{ article.published_at }}<\/code><\/td>\n<td>A blog article&#8217;s publish date<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Common Liquid tags<\/h3>\n<p>Tags add logic. Wrap them in curly brace and percent symbols.<\/p>\n<table>\n<thead>\n<tr>\n<th>Tag<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>{% if %} ... {% endif %}<\/code><\/td>\n<td>Show content only when a condition is true<\/td>\n<\/tr>\n<tr>\n<td><code>{% unless %} ... {% endunless %}<\/code><\/td>\n<td>Show content unless a condition is true<\/td>\n<\/tr>\n<tr>\n<td><code>{% for item in collection %} ... {% endfor %}<\/code><\/td>\n<td>Loop over a list<\/td>\n<\/tr>\n<tr>\n<td><code>{% assign var = value %}<\/code><\/td>\n<td>Create a variable<\/td>\n<\/tr>\n<tr>\n<td><code>{% capture var %} ... {% endcapture %}<\/code><\/td>\n<td>Save a block of content to a variable<\/td>\n<\/tr>\n<tr>\n<td><code>{% render 'snippet' %}<\/code><\/td>\n<td>Include a reusable snippet file (the modern replacement for include)<\/td>\n<\/tr>\n<tr>\n<td><code>{% comment %} ... {% endcomment %}<\/code><\/td>\n<td>Leave a note that does not render<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Common Liquid filters<\/h3>\n<p>Filters change how data looks. Add them after a pipe inside the braces.<\/p>\n<table>\n<thead>\n<tr>\n<th>Filter<\/th>\n<th>Example<\/th>\n<th>Result<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>money<\/td>\n<td><code>{{ 1999 | money }}<\/code><\/td>\n<td>$19.99<\/td>\n<\/tr>\n<tr>\n<td>date<\/td>\n<td><code>{{ article.published_at | date: \"%B %d, %Y\" }}<\/code><\/td>\n<td>October 22, 2026<\/td>\n<\/tr>\n<tr>\n<td>upcase<\/td>\n<td><code>{{ product.title | upcase }}<\/code><\/td>\n<td>SNEAKERS<\/td>\n<\/tr>\n<tr>\n<td>truncate<\/td>\n<td><code>{{ product.description | truncate: 50 }}<\/code><\/td>\n<td>First 50 characters, then an ellipsis<\/td>\n<\/tr>\n<tr>\n<td>default<\/td>\n<td><code>{{ product.vendor | default: \"Our brand\" }}<\/code><\/td>\n<td>A fallback when the value is blank<\/td>\n<\/tr>\n<tr>\n<td>image_url<\/td>\n<td><code>{{ product.featured_image | image_url: width: 600 }}<\/code><\/td>\n<td>A resized image URL<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Formatting dates in Liquid<\/h3>\n<p>The date filter turns a timestamp into readable text using format codes:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{{ article.published_at | date: \"%B %d, %Y\" }}\n<!-- Output: October 22, 2026 --><\/pre>\n<table>\n<thead>\n<tr>\n<th>Code<\/th>\n<th>Output<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>%Y<\/code><\/td>\n<td>Four-digit year (2026)<\/td>\n<\/tr>\n<tr>\n<td><code>%m<\/code><\/td>\n<td>Month number (10)<\/td>\n<\/tr>\n<tr>\n<td><code>%B<\/code> \/ <code>%b<\/code><\/td>\n<td>Month name (October \/ Oct)<\/td>\n<\/tr>\n<tr>\n<td><code>%d<\/code><\/td>\n<td>Day of the month (22)<\/td>\n<\/tr>\n<tr>\n<td><code>%A<\/code><\/td>\n<td>Weekday name (Thursday)<\/td>\n<\/tr>\n<tr>\n<td><code>%H:%M<\/code><\/td>\n<td>24-hour time (14:30)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Shopify Liquid is the template language built into every Shopify theme. When a customer opens a product page, cart, or blog post, Liquid reads your store&#8217;s data and fills in&#8230;<\/p>\n","protected":false},"author":1,"featured_media":33822,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metatitle":"","footnotes":""},"categories":[13],"tags":[],"class_list":["post-14354","post","type-post","status-publish","format-standard","has-post-thumbnail","category-shopify-store-set-up"],"acf":{"breadcrumbs":[{"postpage":[30254]}],"conclusion":"<h2>Conclusion: Shopify Liquid Guide<\/h2>\n<p>Shopify Liquid gives you a practical way to customize your store, even without a full developer background. Once you are comfortable with the three building blocks: objects for data, tags for logic, and filters for formatting, most theme edits start to make sense.<\/p>\n<p>When something does not render as expected, use <code>{{ variable | json }}<\/code> to inspect what data is in scope, or run <code>shopify theme dev<\/code> to see errors in real time. Use the cheat sheet above as a quick reference while you work, make changes on a duplicate theme first, and build from there.<\/p>","repeater":null,"filter":false,"attach_to_post":[683],"author_bio":false,"custom_author_bio":false,"author_bio_name":"","author_bio_info":"","_meta_excerpt_title":"","meta_excerpt":"","trust_signals":{"expert_reviewed":true,"items_tested":""},"key_statistics":null,"key_takeaways":{"takeaways_items":null},"required_subtopics":null,"context_block":{"context_heading":"","context_excerpt":"","context_content":""},"methodology":{"methodology_heading":"","methodology_content":""},"comparison_table":"","mid_content_cta":{"cta_text":"","cta_button_text":"","cta_link":""}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Shopify Liquid: Objects, Tags, Filters and Code Examples<\/title>\n<meta name=\"description\" content=\"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shopify Liquid: Objects, Tags, Filters and Code Examples\" \/>\n<meta property=\"og:description\" content=\"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/\" \/>\n<meta property=\"og:site_name\" content=\"Shopify Theme Detector\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-22T12:58:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-23T09:53:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"478\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Avi Klein\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/\"},\"author\":{\"name\":\"Avi Klein\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#\\\/schema\\\/person\\\/110455f9d31ee83010fb872399fdf93a\"},\"headline\":\"Shopify Liquid: Objects, Tags, Filters and Code Examples\",\"datePublished\":\"2023-05-22T12:58:17+00:00\",\"dateModified\":\"2026-11-23T09:53:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/\"},\"wordCount\":1751,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Shopify-Liquid-Guide.jpg\",\"articleSection\":[\"Shopify Store Set Up\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/\",\"url\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/\",\"name\":\"Shopify Liquid: Objects, Tags, Filters and Code Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Shopify-Liquid-Guide.jpg\",\"datePublished\":\"2023-05-22T12:58:17+00:00\",\"dateModified\":\"2026-11-23T09:53:35+00:00\",\"description\":\"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#primaryimage\",\"url\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Shopify-Liquid-Guide.jpg\",\"contentUrl\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/Shopify-Liquid-Guide.jpg\",\"width\":730,\"height\":478,\"caption\":\"Shopify Liquid Guide\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-liquid\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Shopify Theme Detector\",\"item\":\"https:\\\/\\\/shopthemedetector.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"15 Shopify Themes in 2026\",\"item\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/best-shopify-themes\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Getting Started with Shopify Themes\",\"item\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/getting-started-with-shopify-themes\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Shopify Theme Development and Coding\",\"item\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/shopify-theme-development-and-coding\\\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Shopify Liquid: Objects, Tags, Filters and Code Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/\",\"name\":\"Shopify Theme Detector\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/#organization\",\"name\":\"Shopify Theme Detector\",\"alternateName\":\"Shopify Theme Detector\",\"url\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/logo-9.png\",\"contentUrl\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/logo-9.png\",\"width\":50,\"height\":48,\"caption\":\"Shopify Theme Detector\"},\"image\":{\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/135187717\\\/\",\"https:\\\/\\\/chromewebstore.google.com\\\/detail\\\/npjkomjipdbengebpldgodddlinfjhhm\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/shopthemedetector.com\\\/about\\\/#avi-klein\",\"name\":\"Avi Klein\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g\",\"caption\":\"Avi Klein\"},\"description\":\"Vast experience in the online world. Shopify Expert, SEO expert, Web developer and consultant to several online companies. 2 time Shopify top affiliate award (2022 + 2024). Read more about our approach to reviewing themes and apps.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/kleinavi\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shopify Liquid: Objects, Tags, Filters and Code Examples","description":"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/","og_locale":"en_US","og_type":"article","og_title":"Shopify Liquid: Objects, Tags, Filters and Code Examples","og_description":"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.","og_url":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/","og_site_name":"Shopify Theme Detector","article_published_time":"2023-05-22T12:58:17+00:00","article_modified_time":"2026-11-23T09:53:35+00:00","og_image":[{"width":730,"height":478,"url":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg","type":"image\/jpeg"}],"author":"Avi Klein","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#article","isPartOf":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/"},"author":{"name":"Avi Klein","@id":"https:\/\/shopthemedetector.com\/blog\/#\/schema\/person\/110455f9d31ee83010fb872399fdf93a"},"headline":"Shopify Liquid: Objects, Tags, Filters and Code Examples","datePublished":"2023-05-22T12:58:17+00:00","dateModified":"2026-11-23T09:53:35+00:00","mainEntityOfPage":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/"},"wordCount":1751,"commentCount":0,"publisher":{"@id":"https:\/\/shopthemedetector.com\/blog\/#organization"},"image":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#primaryimage"},"thumbnailUrl":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg","articleSection":["Shopify Store Set Up"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/","url":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/","name":"Shopify Liquid: Objects, Tags, Filters and Code Examples","isPartOf":{"@id":"https:\/\/shopthemedetector.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#primaryimage"},"image":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#primaryimage"},"thumbnailUrl":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg","datePublished":"2023-05-22T12:58:17+00:00","dateModified":"2026-11-23T09:53:35+00:00","description":"Learn Shopify Liquid: a plain-English guide to objects, tags and filters, with copy-ready code examples, a debugging section, and date formatting for themes.","breadcrumb":{"@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#primaryimage","url":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg","contentUrl":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2023\/05\/Shopify-Liquid-Guide.jpg","width":730,"height":478,"caption":"Shopify Liquid Guide"},{"@type":"BreadcrumbList","@id":"https:\/\/shopthemedetector.com\/blog\/shopify-liquid\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Shopify Theme Detector","item":"https:\/\/shopthemedetector.com"},{"@type":"ListItem","position":2,"name":"15 Shopify Themes in 2026","item":"https:\/\/shopthemedetector.com\/blog\/best-shopify-themes\/"},{"@type":"ListItem","position":3,"name":"Getting Started with Shopify Themes","item":"https:\/\/shopthemedetector.com\/blog\/getting-started-with-shopify-themes\/"},{"@type":"ListItem","position":4,"name":"Shopify Theme Development and Coding","item":"https:\/\/shopthemedetector.com\/blog\/shopify-theme-development-and-coding\/"},{"@type":"ListItem","position":5,"name":"Shopify Liquid: Objects, Tags, Filters and Code Examples"}]},{"@type":"WebSite","@id":"https:\/\/shopthemedetector.com\/blog\/#website","url":"https:\/\/shopthemedetector.com\/blog\/","name":"Shopify Theme Detector","description":"","publisher":{"@id":"https:\/\/shopthemedetector.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/shopthemedetector.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/shopthemedetector.com\/#organization","name":"Shopify Theme Detector","alternateName":"Shopify Theme Detector","url":"https:\/\/shopthemedetector.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/shopthemedetector.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2025\/12\/logo-9.png","contentUrl":"https:\/\/shopthemedetector.com\/blog\/wp-content\/uploads\/2025\/12\/logo-9.png","width":50,"height":48,"caption":"Shopify Theme Detector"},"image":{"@id":"https:\/\/shopthemedetector.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/135187717\/","https:\/\/chromewebstore.google.com\/detail\/npjkomjipdbengebpldgodddlinfjhhm"]},{"@type":"Person","@id":"https:\/\/shopthemedetector.com\/about\/#avi-klein","name":"Avi Klein","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/52fa1b1ffc6bc9bc466f5c78a93555f3c49936bc10cac2ca319ff6051d7e0d89?s=96&d=mm&r=g","caption":"Avi Klein"},"description":"Vast experience in the online world. Shopify Expert, SEO expert, Web developer and consultant to several online companies. 2 time Shopify top affiliate award (2022 + 2024). Read more about our approach to reviewing themes and apps.","sameAs":["https:\/\/www.linkedin.com\/in\/kleinavi\/"]}]}},"_links":{"self":[{"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/posts\/14354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/comments?post=14354"}],"version-history":[{"count":17,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/posts\/14354\/revisions"}],"predecessor-version":[{"id":56643,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/posts\/14354\/revisions\/56643"}],"acf:post":[{"embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/posts\/683"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/media\/33822"}],"wp:attachment":[{"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/media?parent=14354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/categories?post=14354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shopthemedetector.com\/blog\/wp-json\/wp\/v2\/tags?post=14354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}