How to add a back button on refresh theme

Topic summary

Issue: Users want to add a back button to product and collection pages in Shopify’s Refresh theme.

Solution Provided:

  1. Create a new snippet called back-button.liquid with custom code
  2. Modify the theme.liquid file in the Layout folder
  3. Insert the back button code above the {{ content_for_layout }} tag

Common Problems:

  • Missing {{ content_for_layout }}: Some users (including Origin theme users) can’t locate this tag. Workaround: place code below the <body> tag instead
  • Deletion errors: One user removed the back button but now receives a “Could not find asset snippets/back-button.liquid” error (Line 286)
  • Excessive spacing: The back button displays with too much vertical space on product/collection pages

Unanswered Questions:

  • How to add the button to all pages (not just product/collection)
  • How to customize button color and layout
  • How to reduce spacing around the button
  • How to fix the deletion error

Status: Discussion appears inactive; recent questions remain unresolved.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hi! I followed these instructions to get a back button for my site and it worked great!! I have then decided I didn’t want the back button anymore and tried to delete it and now receive error: “Liquid error (layout/theme line 286): Could not find asset snippets/back-button.liquid”

Do you know how I might be able to fix it by any chance? So desperate for help.