Beginners

Shopify Liquid for beginners

A friendly starting point for developers new to Shopify Liquid—variables, objects, loops, conditions, and the workflow from HTML mockup to editable theme section.

2 min read · Published 2026-06-08

Knowledge Hub

What is Shopify Liquid?

Liquid is a template language Shopify uses to combine static HTML with dynamic store data. It is not a full programming language—you will not build APIs in Liquid. Instead, you output product titles, loop over collections, show cart counts, and read merchant settings from section schema.

If you know HTML and basic templating, Liquid feels familiar within a day. This guide covers the core concepts; /shopify-liquid-cheatsheet is your ongoing reference.

Liquid syntax basics

  • {{ }} — output tags that render values
  • {% %} — logic tags for if, for, assign, render
  • Pipe filters transform output: {{ price | money }}
  • Comments: {% comment %} ... {% endcomment %}

Variables and assign

Variables store temporary values. Use assign to name a collection, build a class string, or cache a computed value inside a template.

assign example

{% assign sale_collection = collections['sale'] %}
{% assign heading_class = 'heading heading--' | append: section.settings.size %}

Objects and dot notation

Shopify exposes objects—product, collection, cart, shop, section, block—with properties you access via dot notation. On a product template, product.title returns the current product name. Inside sections, section.settings.heading returns the merchant-configured heading.

  • product — title, price, featured_image, variants, url
  • collection — products, title, url, image
  • cart — item_count, total_price, items
  • section.settings — values from your section schema
  • block.settings — values from a block inside a section

Loops

for tags iterate arrays. The most common beginner loops: products in a collection, items in cart, and blocks in a section.

Beginner loop

{% for product in collection.products limit: 4 %}
  <p>{{ forloop.index }} — {{ product.title }}</p>
{% endfor %}

forloop.index, first, and last help with zebra striping and first-item styling.

Conditions

if tags branch on availability, tags, settings, and blank checks. Use elsif for multiple branches and unless as inverted if.

if / unless

{% if section.settings.heading != blank %}
  <h2>{{ section.settings.heading }}</h2>
{% endif %}

{% unless product.available %}
  <span>Sold out</span>
{% endunless %}

Beginner workflow: HTML to section

  • Build or receive static HTML for a component.
  • Paste into /converter — settings and blocks are inferred.
  • Review output; learn schema structure in /shopify-schema-guide.
  • Add section.liquid to theme; register on JSON template per /shopify-section-tutorial.
  • Let merchants edit content in the theme editor.

Common beginner mistakes

  • Hardcoding text that merchants should edit—use section.settings instead.
  • Forgetting presets—sections won't appear in Add section without them.
  • Global CSS that breaks other sections—scope with section.id.
  • Using include instead of render for snippets.
  • Invalid schema JSON—validate before deploying.

Where to go next

Read /how-shopify-sections-work for architecture, /shopify-liquid-examples for copy-ready patterns, and /dynamic-shopify-blocks-guide when you need repeatable merchant-managed rows.

Frequently asked questions

Do I need to learn Liquid before using the converter?

No. The converter is a learning tool—inspect generated Liquid and schema to understand how your HTML maps to Shopify patterns.

How long does it take to learn Liquid basics?

Most developers with HTML experience grasp output, loops, and conditions in a few hours. Schema and blocks take a few days of section practice.

Start converting HTML

Paste your markup and export production-ready Shopify Liquid sections with schema and blocks.

Trust

Built for serious Shopify development

Production-ready sections, validated schema, and workflows theme engineers trust on client projects.

Production-ready output

Export complete section.liquid files with schema, presets, and scoped CSS ready for theme repos.

Built for Shopify developers

Designed for freelancers, agencies, and in-house teams shipping OS 2.0 sections weekly.

OS 2.0 compatible

Output follows Online Store 2.0 conventions—JSON templates, blocks, and valid schema JSON.

Schema validation

Automated checks catch missing presets, invalid setting ids, and common Liquid issues early.

AI-assisted workflow

Optional AI structure detection with deterministic fallback for reliable section generation.

Theme compatibility

Sections align with Dawn, Prestige, Broadcast, Impulse, and custom JSON-template themes.

Liquid BasicsKnowledge Hub

Generate Shopify sections

Free AI-powered converter — OS 2.0 compatible output with schema validation.

Start converting HTML