Custom Liquid
What is the Custom Liquid 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:
- The product page, for example to show a metafield or an app widget between the product information blocks
- The cart and the cart drawer
- Rich text and Image with text
- Image banner content and the footer
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
producton a product page.
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.