Custom Liquid Block
Use Custom Liquid for store-specific Liquid, markup, embeds, and small integrations that cannot be created with built-in blocks or app blocks.
Setup Order
- Confirm a built-in block cannot do itCheck available section, block, and app block options before adding custom code.
- Keep the snippet smallUse Custom Liquid for focused output such as a short embed, badge, message, or integration hook.
- Use trusted codeOnly add Liquid, HTML, scripts, or embeds from sources you understand and maintain.
- Preview the outputCheck desktop, mobile, and the surrounding section so the custom output does not break layout or keyboard access.
- Document the purposeKeep a merchant-side note of what the block does and where any external embed or script comes from.
Good Uses
| Use | Why it fits |
|---|---|
| Small trust badge | A compact custom badge or message that does not need a full app. |
| Store-specific embed | A focused third-party embed required by the merchant. |
| Conditional message | A small Liquid condition tied to product, collection, customer, or market data. |
| Integration hook | A minimal element needed by a trusted app or external service. |
Avoid
| Avoid | Reason |
|---|---|
| Large page layouts | Built-in sections, Containers, and content blocks are easier to maintain. |
| Untested scripts | Scripts can affect performance, accessibility, and checkout-adjacent journeys. |
| Broken markup | Unclosed tags can affect surrounding sections. |
| Duplicated app output | App blocks are usually easier to manage when an app provides one. |
QA Checklist
| State | What to confirm |
|---|---|
| Liquid output | The block renders without Liquid errors. |
| Layout | The output does not overflow, overlap, or break nearby blocks. |
| Mobile | The custom output remains usable on small screens. |
| Keyboard access | Any interactive element can be reached and used with a keyboard. |
| External embed | The source is trusted and still loads in the target markets. |
| Maintenance | The store team understands what the code does and where it is used. |