Shopify Custom Liquid: How to Use It, Snippets to Paste, and Its Limits
Custom Liquid is the escape hatch built into every modern Shopify theme: a section (and block) where you paste your own Liquid, HTML, CSS or JavaScript straight from the theme editor, no code files touched. It is a quick way to add something your theme does not offer, and it has real limits.
Here is where it lives, what to paste into it, and when to use a better tool.
Where to find Custom Liquid
In the theme editor (Online Store, then Customize): Add section, then Custom Liquid, on any OS 2.0 theme, Dawn included (our Dawn theme guide covers what else Dawn lets you change without code). Inside product templates you can also add it as a block among the product information blocks, which gives your code access to the current product object.
Paste your code in the box, save, done. Whatever you paste renders exactly where the section sits.
Three snippets worth pasting
1. A shipping-deadline bar (Liquid date math, no app needed):
<div style="text-align:center;padding:10px;background:#f6f6f4;font-size:14px;">
Order today, ships by
{{ 'now' | date: '%s' | plus: 259200 | date: '%A, %B %-d' }}
</div>
The 259200 is three days in seconds; adjust to your handling time. Know its limits: it adds calendar days, so it ignores weekends, holidays and your cut-off time, and 'now' is the time Shopify rendered the page, which can be earlier than the visit because pages are cached. Treat the date as an estimate, or use a shipping app if the promise must be exact.
2. A trust badges row (plain HTML, style to taste):
<div style="display:flex;gap:24px;justify-content:center;padding:16px;font-size:14px;">
<span>Free shipping over $50</span>
<span>30-day returns</span>
<span>Secure checkout</span>
</div>
3. A conditional product note (as a Custom Liquid block on the product template):
{% if product.tags contains 'preorder' %}
<p style="color:#8a5f14;font-size:14px;">
Pre-order item: ships within 3 weeks.
</p>
{% endif %}
Tag-driven, so merchandising controls it without touching code again.
Custom CSS, the sibling feature
For styling rather than content, Shopify's theme editor also has Custom CSS: under Theme settings for the whole theme, and at the bottom of each section's settings for one section. Shopify caps it at 1,500 characters for the theme-wide box and 500 per section (Shopify Help Center). Paste CSS there rather than wrapping <style> tags in Custom Liquid; it survives section reshuffles and keeps overrides in one place, and when you hit the character cap, that is the sign the change belongs in the theme's code.
What Custom Liquid can't do
The honest limits, and where people hit them:
- No settings. Whatever you paste is hardcoded: changing the text means editing code again. Real sections expose settings through a schema so anyone on the team can edit in the sidebar.
- No blocks, no repetition. A testimonial list or logo row wants repeatable blocks; Custom Liquid gives you one box.
- It grows into a liability. Several Custom Liquid sections across templates add up to undocumented code that is easy to forget. At that point you want actual sections in the theme.
- Complex features do not fit. Bundles, comparison tables, tabbed product info: these are real sections with markup, style and schema working together.
When you outgrow the box
The usual path is to hire a developer to build a real section. Another option is Clyro's Liquid Studio (our product): bring your theme, describe what you wanted the Custom Liquid to do ("a trust bar with icons, editable text, and a toggle per badge"), ask for it as a section with settings, and review the result before you download the theme and upload it back to Shopify. Custom Liquid stays useful for small, quick additions. Terms you will meet on the way are all in the theme glossary.
FAQ
Is Custom Liquid free? Yes, it is a built-in feature of OS 2.0 themes. No app required.
Can I put JavaScript in Custom Liquid?
Yes, <script> tags work. Keep it light: scripts pasted this way load on the page like any other and can slow it down.
Why is my Custom Liquid not showing product info?
Object access depends on context: product is only available inside product templates (use it as a block there). On the homepage, there is no product to reference.
Custom Liquid vs editing theme code? Custom Liquid blocks live in your theme's templates and stay visible in the editor, so they travel with that theme but not to a different theme; keep a copy of the code. Edits to theme files are more powerful but live in the code. For anything with settings or repetition, a real section with a schema beats both.
Keep reading: Shopify schema generator and build a store with AI.
