A piece of code is showing on the front end of my website

Topic summary

A Shopify store owner encountered mysterious code displaying on their website’s front end after adding multiple customizations. The code appeared to be reversed or corrupted HTML markup.

Diagnosis:

  • The issue likely stemmed from code mistakenly added to theme template files
  • Primary suspects were index.liquid or theme.liquid files
  • Could also be caused by a third-party app bug

Solution Steps:

  1. Access theme code via Shopify admin: Themes → Actions → Edit code
  2. Check theme.liquid for missing or malformed tags
  3. Remove the problematic code snippet
  4. Create a backup before making changes

Resolution:
The issue was successfully resolved by locating and removing the code from theme.liquid. The problem appeared to be related to a missing or improperly closed HTML tag.

Additional Recommendations:

  • Explore Shopify Developers website for coding tutorials
  • Contact third-party app support if the issue persists
Summarized with AI on November 23. AI used: claude-sonnet-4-5-20250929.

I have added a lot of codes to my website so customize it, i don’t know which one is causing the issue but the following code is showing on top of the page.

Hey @backpal ,

Great question!

This code looks like it’s a piece of the HTML markup for your website’s homepage. It’s likely that this code is appearing on the front end of your website because it has been mistakenly added to one of your theme’s template files, such as the index.liquid file.

To fix this issue, you’ll need to access the theme code for your Shopify website. You can do this by navigating to the “Themes” section of your Shopify admin panel, and then clicking on the “Actions” button for the theme that you want to edit. From there, you can select the “Edit code” option.

Once you have access to the theme code, you should be able to locate the file that contains the code you provided. It’s likely to be in the template section , specifically index.liquid or theme.liquid .

You can remove that piece of code from the file and then save the changes. It’s always a good idea to create a backup of your theme code before making any changes, just in case something goes wrong.

It is also possible that this is a bug coming from a third-party app that you are using, In that case, it would be better to reach out to their support team to check if they have any fixes or updates that can fix this.

TIP: As you continue to develop and edit your store, I highly suggest taking advantage of the Shopify Developers website. This is a place where our developers post hundreds of step by step coding tutorials which is a great way to familiarise yourself with all the different customization possibilities within your theme!

Let me know how you get on!

1 Like

Go to theme.liquid and see if you are missing something.

The cause of this could be the removal of a tag.

1 Like

Thet worked for me. it was in theme.liquid, thanks for your support

Don’t hesitate to reach back out if you require any further assistance as you continue to work on your store.

All the best,