Setup guide

How to duplicate your theme and add a snippet in Shopify

Go to Online Store › Themes, open the … menu on your theme and click Duplicate, so you work on a copy. On the copy, open … › Edit code, add a new file in the snippets folder, paste the code, save, and preview. Publish the copy only when everything looks right.

Steps and menu names checked against Shopify’s Help Center and the Shopify admin on 28 November 2026.

Duplicate your theme (your backup)

  1. Open your themes. In your Shopify admin, click Online Store under Sales channels. The Themes page opens.

  2. Open the theme menu. On your current theme, click the … button (Click for more theme actions).

  3. Duplicate. Click Duplicate. A copy named “Copy of …” appears under Draft themes after a moment.

Open the code editor

  1. Open the copy’s menu. Under Draft themes, click the … button on the copy.

  2. Edit code. Click Edit code. The code editor opens with folders on the left: assets, config, layout, locales, sections, snippets and templates.

Add a snippet file

  1. Make a new file. Hover over the snippets folder and click New File… (or right-click it and choose New File…).

  2. Name it. Type the file name the tool gives you, for example est-gwp.liquid, and press Enter.

  3. Paste and save. Paste the code from the tool and click Save (Ctrl+S, or ⌘+S on a Mac).

  4. Render it. Open the file the tool names (often layout/theme.liquid) and paste the render line where it says, for example just before </body>. Save.

    {% render 'est-gwp' %}

Or paste into a Custom Liquid block (no code editor)

Many snippets don’t need the code editor at all. Shopify’s own themes have a Custom Liquid section and block that run the code you paste, and you can remove it with one click.

  1. Open the theme editor. Online Store › Themes, then click Edit theme on your theme (or on the copy, to test first).

  2. Pick the page. Use the menu at the top of the editor to open the page you want, for example a product page.

  3. Add Custom Liquid. In the left sidebar, click Add section (or Add block inside a section, such as Product information) and choose Custom Liquid.

  4. Paste and save. Paste the code into the Liquid code box, check the preview, and click Save.

Preview, then publish

  1. Preview. Back on the Themes page, open the copy’s … menu and click Preview. Test the change in the preview window.

  2. Publish. When it all works, click Publish on the copy. Your old theme stays in your theme library as the backup.

Tools that need this

More setup guides

Sources

Updated .