Skip to content

Custom Liquid ​

A section that renders exactly what you type into it — custom Liquid or plain HTML. Use it for third-party embeds, code snippets, store details, or any one-off markup that no other section covers.

Whatever you enter is the whole section: it renders inside the theme's standard page container, wrapped in the color scheme you pick, so even hand-written content sits on your store's grid and palette. There is no heading, padding control, or other chrome around it.

What it looks like ​

There is no live demo here, and there cannot be a useful one: this section renders whatever Liquid you paste into it, so its appearance is whatever your code produces. The worked example below is the closest thing to a preview.

Settings ​

SettingWhat it does
Color schemeWhich of your theme's color schemes the section uses.
Liquid codeThe Liquid or HTML to render. When you first add the section it contains a short example paragraph — replace it with your own markup.

Test before you save. As the editor itself warns: Liquid code executes on render, and any error here will break the page. Preview your change in the theme editor before publishing.

A worked example ​

Anything you paste in becomes the whole section. This one prints a short shipping note under a product, and shows the two habits worth copying — guard every value before you print it, and escape anything a person typed:

liquid
{%- if product.metafields.custom.lead_time != blank -%}
  <p>Ships in {{ product.metafields.custom.lead_time | escape }} working days.</p>
{%- endif -%}

The {%- if -%} guard means the section renders nothing at all on a product with no lead time, rather than an empty sentence. The escape filter means a value typed in the admin — or written by an app — cannot inject markup into your page.

Blocks ​

This section does not use blocks.

When it isn't showing ​

This section renders exactly the Liquid you paste into it, so an empty box renders nothing. Nothing appearing means the box is empty, or your code produced no output — a tag that only assigns a variable prints nothing on its own.

Shopify silently skips code that references an object the page does not have, so test product code on a product page.

Tips ​

  • Your markup renders inside the theme's standard page container. If an embed needs to span the full browser width, it will need its own styling.
  • Add it from the theme editor's Add section picker on any page that accepts sections.

When to use something else ​

  • Formatted text with a heading and a button — use Rich text; you get editor controls instead of writing markup.
  • A layout composed from the theme's own building blocks (headings, text, images, buttons) — use Custom section; no code required.

Built for the Shopify Theme Store.