Custom Liquid

Add your own Liquid, HTML or app code to any page, without editing the theme files.

Overview

The Custom liquid section adds custom solutions that need Liquid logic, such as quick theme changes, embed codes or app snippets. It keeps your code in the theme editor, so it's easy to find and survives theme updates. Refer to Shopify's Liquid reference to learn more about Liquid.

There are two sections named Custom liquid in the Add section list. You can tell the unwrapped version from its settings: it has only the code field.

  • Custom liquid places your code inside the theme's normal section layout, with a color scheme, page width and margins like other sections.
  • Custom liquid (unwrapped) has no settings besides the code. Your code isn't wrapped in the section layout, so use it when the code brings its own layout, for example a full-width embed or an app's own styles.
Custom liquid settings
Setting Type Default Description
Color scheme Color scheme Default Colors of the section.
Custom liquid Liquid Sample text Your Liquid, HTML or app code.
Full width Toggle Off Desktop. Spans the section across the full page width.
Margin top and bottom (desktop / mobile) Range 40 px Space above and below the section.
Custom liquid (unwrapped) settings
Setting Type Default Description
Custom liquid Liquid Sample text Your Liquid, HTML or app code, centered on the page without margins.

Setup

Steps

  1. From your Shopify admin, go to Online Store → Themes.
  2. Click Customize next to your active theme.
  3. Click Add section and select Custom liquid.
  4. Paste your code in the Custom liquid field.
  5. Click Save.

Code in a Custom liquid section runs on your live store. Test it in a duplicate of your theme first, and check the page on mobile.

Try ideas without a developer

A Custom liquid section is a fast way to add a review widget, a size chart embed or a seasonal message from an app. Because the code lives in the theme editor, you can turn it off or remove it any time without touching the theme code.