Get a free Shopify store audit

Custom Liquid in Shopify: What It Can and Can't Do

What Custom Liquid in Shopify actually does, how it differs from Custom HTML, its real limits, and when to build a real section instead.

Custom Liquid in Shopify: What It Can and Can't Do — ASSOSIATIX Journal

Custom Liquid in Shopify is a built-in section and block type that lets you paste HTML and a limited subset of Liquid directly into the theme editor, without opening your theme's code files. It's the fastest way to drop in an app snippet or a one-off embed, but the code you paste can't do everything your theme's own Liquid files can.

What Custom Liquid in Shopify Actually Is, and How It Differs From Custom HTML

Custom Liquid is powered by the liquid input setting type, one of Shopify's specialized setting types alongside things like image_picker and color. A liquid-type setting outputs a multi-line text field that accepts HTML plus a limited subset of Liquid markup — exactly what you need for a custom block of content, or for the integration snippet an app's install instructions ask you to paste in.

Custom HTML is a different, simpler setting type. It also outputs a multi-line field for pasting markup, but it only accepts static HTML — there's no Liquid processing involved, so it can't pull in dynamic store data like a product price or a customer's name. If what you're pasting is pure markup with no store data in it, Custom HTML works. The moment you need to reference something from the store, you need Custom Liquid instead.

How to Add a Custom Liquid Section or Block in the Theme Editor

Adding either one follows the same path through the Shopify admin: go to Online Store > Themes > Customize, open the page or template where you want the content, and click Add section or Add block. Search for Custom Liquid in the picker, add it, then paste your code into the setting and save. The section or block appears wherever you placed it, with no theme files touched.

If you'd rather have a developer build the capability directly into your theme instead of relying on a pasted snippet, our Shopify theme development service covers that kind of build.

Whether Custom Liquid shows up as an option at all, and exactly what it's labeled, depends on your specific theme and theme version — Shopify's own documentation is explicit that the sections and blocks available in the editor vary by theme. If you don't see it where you expect, check your theme's own documentation or contact its developer before assuming the feature is missing entirely.

The Real Limits of the Liquid Setting Type

Before you lean on Custom Liquid for anything beyond a quick embed, it's worth knowing exactly where it stops working.

  • Size cap: content entered in a liquid-type setting can't exceed 50KB. Saving content that exceeds the limit, or that contains invalid Liquid, produces an error instead of saving.
  • No access to layout-level objects: a liquid setting can't reach layout, content_for_header, content_for_layout, or content_for_index — the objects that control your theme.liquid wrapper and header injection.
  • No access to section, schema, or settings: you can't reference another section's data, read or write a {% schema %} tag, or pull values from settings_schema.json from inside a liquid setting.
  • No access to javascript or stylesheet tags: the dedicated tags sections use to scope JS and CSS to themselves aren't available here.
  • What it can access: global Liquid objects, template-specific objects like product or collection when the setting is rendered on a matching template, and the standard set of Liquid tags and filters.
  • Silent failure on typos: if your code references a tag that doesn't exist or is empty, Shopify renders it as an empty string instead of throwing an error — which makes a broken reference easy to miss during a quick visual check.

One side effect of these limits is worth knowing if your store sells in multiple languages: the stored value of a liquid setting isn't available in Shopify's Translate & Adapt tool. That makes it a reasonable place for language-neutral content, like a CSS class name or an app's integration code, but not for customer-facing copy you intend to localize — the Liquid itself can still render differently per locale through things like localization.language, but the setting's raw text stays a single, untranslated string.

When to Graduate From a Custom Liquid Block to a Real Section File

A real section is a Liquid file that lives in your theme's sections directory, and it has access to everything a liquid setting doesn't. It can define its own {% schema %} block with full settings, blocks, and presets; a single section supports up to 50 blocks, and a template or section group can render up to 25 sections — which is also why Shopify caps total blocks per template at 1,250 across all of a template's sections. None of that structure is available to a pasted liquid setting.

The schema itself has real rules worth knowing before you build one: each section file can have exactly one {% schema %} tag, it has to contain valid JSON, and it can't be nested inside another Liquid tag — any of those mistakes produces a syntax error when you try to save. Block type and name values must be unique within the section, and setting IDs must be unique within each block.

In practice, the decision is simple. If you're pasting a static embed, a tracking snippet, or a small piece of dynamic content that fits in 50KB and doesn't need layout or schema access, Custom Liquid is the right tool and the fastest path. If you find yourself wanting merchant-configurable settings, reusable blocks, or access to objects the liquid setting type blocks outright, that's the signal to build a real section file instead. Our guide on editing Shopify theme code safely covers how to make that kind of change without breaking the live theme.

A real section also gets you access to app blocks, which let merchants add app-provided content into the section without touching theme code at all — something a pasted liquid setting has no equivalent for. And a statically rendered section (one referenced directly rather than through a JSON template) only ever has a single instance: if the same section file is rendered in more than one place, all of those renderings share the same setting and block values, which is worth knowing before you assume you can configure two copies independently.

Shopify has also been expanding what's possible at the theme-file level — new block and partial tags, covered in our look at that developer preview, point toward more reusable, composable Liquid outside the limits a single setting imposes.

If you want help deciding which approach fits your theme, talk to our team.

Frequently asked questions

What is Custom Liquid in Shopify?

It's a built-in section and block type, powered by the liquid input setting, that lets you paste HTML and a limited set of Liquid markup into the theme editor without editing theme files. It's commonly used for app integration snippets and one-off embeds.

How do I add custom Liquid code to my theme?

In the Shopify admin, go to Online Store > Themes > Customize, open the page you want to edit, click Add section or Add block, search for Custom Liquid, add it, and paste your code into the setting.

What's the difference between a Custom Liquid section and a Custom HTML section?

Custom Liquid accepts HTML plus a limited subset of Liquid, so it can reference some store data. Custom HTML only accepts static markup with no Liquid processing, so it can't pull in dynamic data like product or customer information.

Is there a size limit on Liquid code in a theme setting?

Yes. Content in a liquid-type setting can't exceed 50KB. Going over that limit, or including invalid Liquid, causes an error when you try to save.

Will my custom Liquid code survive a theme update?

Content you enter into a Custom Liquid section or block is stored as theme setting data, separate from the theme's code files, so it isn't overwritten when the theme's code is updated. Availability of the Custom Liquid section or block itself still depends on your specific theme and version, as noted in Shopify's own documentation.

Sources

Tell us what you're building.

Share a few details and we'll reply within 1–2 business days with questions, a scope and a quote.