Help removing code at top of page

Topic summary

A user is experiencing unwanted code appearing at the top of their Shopify store page after adding custom code. They suspect the issue is in the layout/theme.liquid file but are unsure which code to remove.

Troubleshooting steps suggested:

  • Navigate to Shopify admin > Online Store > Themes > Edit code
  • Open the layout/theme.liquid file
  • Check before the <!DOCTYPE html> line for:
    • Random characters or text
    • Unclosed or broken HTML tags
    • Misplaced snippets or scripts
  • Delete any unusual code and ensure the file starts cleanly
  • Save changes and refresh the storefront

Next steps:
Responders have requested the store URL and collaborator access code to investigate and provide more specific assistance. The issue remains unresolved pending additional information.

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

Your site is likely due to something accidentally added to the layout/theme.liquid file. Here’s how you can fix it:

  1. Go to your Shopify admin>Online Store>Themes.

  2. Click “…” (three dots) on your current theme, then click Edit code.

  3. Open the layout/theme.liquid file.

  4. Check right at the top of the file, before the line — sometimes extra code gets pasted there by mistake.

  5. Look for anything unusual like Random characters or text,Unclosed or broken HTML tags,A snippet or script that doesn’t belong
    Delete the strange code and make sure your file starts cleanly.

  6. Click Save, then refresh your storefront to see if it’s fixed.

Please send us your store collaborator request code and Site URL so that we will able to send an access request and then investigate and try to fix the issue.