Shopify's Custom Liquid Section: What It's Good For and When It Becomes a Problem

By Affan Siddiqi, Founder, Psycomaths · Part of Shopify store development

Shopify's Custom Liquid section or block lets you add Liquid, HTML and small amounts of JavaScript to a page from the theme editor, without editing theme files. It is fine for small, page-specific jobs like showing a metafield, embedding a widget or adding a one-off message. It becomes a problem when it is used to hold tracking scripts, styling for the whole site or features that should be proper theme sections, because that code is hard to find, test and carry over to a new theme.

What the section actually is

Custom Liquid is a section (and in many themes also a block) with one large code field. Whatever you paste is saved in the template's settings, not in the theme's code files. It renders where you place it on that template, and it can use Liquid objects such as the product or its metafields. It is a convenient escape hatch for people who can write a little code but do not want to touch the theme files.

Good uses

Showing a metafield in a layout the theme does not support, a short delivery message for one collection, a small embed from a tool that gives you a snippet, or a temporary banner for a campaign page. The test is whether the code is small, local to one page and easy for the next person to understand. If you would be comfortable deleting it in six months, it probably belongs here.

Where it causes trouble

Tracking pixels pasted into Custom Liquid blocks are a common source of duplicate events, because they sit on top of the pixel the sales channel already loads. Site-wide CSS spread across several blocks makes design changes unpredictable. Long scripts can slow the page and break when the theme updates. And because the code lives in template settings, a developer searching the theme files will not find it.

Keep a register and move what grows

Keep a short list of every Custom Liquid block: page, purpose, who added it and when. Before a theme change or redesign, go through the list, because these blocks do not carry over to a new theme on their own. Anything that has grown into a real feature should become a proper section in the theme code, with settings, where it can be version controlled and reused.

Questions

Related guides

Multiple Product Templates on Shopify: When You Need Them and When Metafields Do the Job

A Shopify brand needs a separate product template when a group of products needs a different page layout, such as bundles, subscriptions, gift cards or an ad landing page. It does not need one when only the content differs, like a size guide, ingredients or care instructions. That content belongs in metafields shown through the default template. Templates for layout, metafields for content keeps the theme manageable as the catalog grows.

Too Many Shopify Apps: The Real Conversion Cost

Too many installed Shopify apps create conversion cost beyond page speed: competing popups interrupting the same visitor, conflicting tracking scripts producing inaccurate data, and visually cluttered pages from stacked widgets (reviews, upsells, trust badges, chat) all fighting for attention at once. The speed cost is real and well known, but the usability and clarity cost often matters just as much and gets discussed far less.

How to Set Up Meta Conversions API on Shopify

On Shopify, Meta's Conversions API (CAPI) is switched on inside the Facebook & Instagram sales channel by setting customer data sharing to Maximum. That sends purchase and checkout events from Shopify's server as well as from the browser Pixel. The setup takes minutes. The part most stores skip is checking afterwards that the two event streams are deduplicated and that Event Match Quality is high enough for Meta to use them.

Custom Shopify App or an App Store App: How to Decide

Use an App Store app when your need is common (reviews, subscriptions, bundles, loyalty) and an existing app does it well enough. Build a custom app when the job is specific to your business, such as syncing orders with your own warehouse system, a pricing rule no app supports, or an internal tool your team uses daily, and when the monthly app fees or manual work it replaces add up to more than the build and upkeep. A custom app is software you now own, so the decision includes who maintains it.

Selling Personalised Products on Shopify: The Setup Matters More Than the Theme

For personalised products on Shopify, the theme matters less than how personalisation is captured and fulfilled. Most stores use a personalisation app or line item properties to collect the text, image or options, show a live preview so the shopper sees what they will get, pass the details cleanly into the order for production, and set clear rules on proofs, production time and returns. Pick the personalisation app first, then choose a theme that works well with it on mobile.

Related service

Website Development →

Psycomaths' website development service builds and modifies the ecommerce storefront itself -- Shopify theme development, custom sections, and page changes aimed at conversion rate and page speed -- separate from the paid media that drives traffic to it.

Chat with Psycomaths on WhatsApp