Documentation

Custom Liquid and Apps sections: code and app blocks

Add code (HTML, Liquid, a third-party script) or your Shopify apps' blocks anywhere on your pages, without touching the theme files.

Two sections hold what the theme doesn't do on its own: Custom Liquid, to paste a piece of code (a widget, a tracking script, an iframe), and Apps, to place your Shopify apps' blocks (reviews, loyalty program, forms…). Both sit in the Apps and code category of the Add section picker, and can be added to every template.

Custom Liquid

The section holds a single block, Custom Liquid, with a Liquid code field. You paste HTML, CSS, JavaScript or Liquid (the language of Shopify themes) into it: the code given by a service (booking widget, map, video from a platform), a specific callout, a metafield display.

Screenshot to take — Shopify theme editor > Home page > Custom Liquid section > Custom Liquid block selected: right panel with the Liquid code field containing sample code (for example an iframe), and the rendered preview in the center

Add the section

  1. Open Online Store > Themes > Edit theme and pick the template.
  2. Click Add section, category Apps and code, then Custom Liquid.
  3. Click the Custom Liquid block and paste your code into Liquid code.
  4. Click Save, then check the result on your store.

The settings

  • Custom Liquid block: Liquid code ("Add app snippets or other Liquid code to create advanced customizations"), Bottom spacing, Show on (Desktop and mobile, Desktop only, Mobile only), width and Animation.
  • Section: the common frame (Layout, Color palette, Separators, Animations), set by default to the standard page width, vertical direction, with 40 px of spacing at the top and bottom (32 px on mobile). See Understand the theme editor.

Like every composed section, it accepts other blocks: you can put a Heading and a Text above the code, to introduce the widget in your store's typography.

Apps

The Apps section is an empty frame, made for app blocks. Once an app is installed in Shopify, its blocks show up in Add block, alongside the theme's blocks.

Screenshot to take — Shopify theme editor > Product template > Apps section added > Add block open: the blocks of an installed app (for example a reviews app) listed below the theme's blocks

Add the section

  1. Install the app from the Shopify App Store and follow its setup.
  2. In the editor, pick the template, click Add section, category Apps and code, then Apps.
  3. In the section, click Add block and choose the app's block.
  4. Set up the block (its settings come from the app), then click Save.

The settings

The section only has the common frame (Layout, Color palette, Separators, Animations), set by default to a vertical direction with 40 px of spacing between blocks. It can't be placed in the header.

Tips and pitfalls

  • Before pasting code, check whether the theme already does it: countdown, map, video, Trustpilot reviews, form… all have their own blocks, lighter and matched to your brand. See A tour of the sections.
  • Every script you add slows the page down a little. Stick to what really matters, and remove the blocks of uninstalled apps. See Improve your store's speed.
  • For customer reviews, the theme's rating and stars read the data from your reviews app; the app's block is there to show the full list of reviews. See Customer reviews.
  • Show on lets you load a widget only on desktop or only on mobile, for example a lighter version on phones.

Go further