{"title":"▶️ Use Liquid templates","slug":"how-to-use-liquid-templates","url":"https://support.storeconnect.com/articles/how-to-use-liquid-templates","url_markdown":"https://support.storeconnect.com/articles/how-to-use-liquid-templates.md","subtitle":null,"summary":"Liquid templates control the HTML layout and data shown on each page of your store, including page, block, and snippet templates, how template keys work, and how to pull store data into a template.","type":"Videos_Tutorials","video_url":"https://vimeo.com/1213698877?share=copy\u0026fl=sv\u0026fe=ci","keywords":"liquid, liquid templates, theme templates, page templates, block templates, snippet templates, template key, render tag, storefront customization, dynamic content, theme development, liquid tags, liquid objects, liquid filters, components","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"Liquid templates sit between your store's data and what a visitor sees. Each template holds the HTML for part of your storefront, plus the Liquid code that pulls in live data such as products, categories, and cart contents. Watch this video if you are customizing a theme for the first time and want to know which template to edit and how to get data into it.\n\nFor full theme template information, see [Liquid theme components](theme-components) and [Theme templates](theme-templates).\n\n## Code snippets referred to in the video\n\n### Low stock badge snippet\n\nThis is the body of the snippet template, saved as a **Theme Template** with the key `snippets/low_stock_badge`. It reads the product on the current page and shows a warning only when the product tracks inventory and has fewer than five units left to sell.\n\n\n```liquid\n\n{% if current_product.track_inventory? and current_product.total_available_to_sell \u003c 5 and current_product.total_available_to_sell \u003e 0 %}\n\u003cdiv\u003e\n\u003cstrong\u003e⚠️ Only {{ current_product.total_available_to_sell }} left in stock!\u003c/strong\u003e\n\u003c/div\u003e\n{% endif %}\n```\n\n\n### Render the snippet\n\nAdd this line to the product page template wherever you want the badge to appear. The name in quotes is the snippet's key without the `snippets/` prefix.\n\n\n```liquid\n\n{% render \"low_stock_badge\" %}\n```\n"}