Skip to main content

Custom Liquid

What is the Custom Liquid block?​

Since v1.0.0Theme block

The Custom Liquid block lets you add your own code inside a section: an app snippet, an embed code from another service, or Shopify Liquid code that shows something the theme has no setting for. Because it sits inside a section, the code appears exactly where you place the block, for example right under a product's price.

Where can I use it?​

Custom Liquid is a theme block, so you can add it to any section or block that shows Add block in the theme editor, for example:

See How sections and blocks work for how to add a block.

To add code as a separate, full section instead, use the Custom Liquid section.

Settings​

  • Liquid code: Paste or write your code here. You can use HTML, CSS, JavaScript and Liquid. The code can use the objects of the page it is on, for example product on a product page.
note

When the field is empty, the block shows nothing. The block adds only a small space below your code. Code that breaks the layout can affect the blocks around it, so preview the page on desktop and mobile after you save.