Removing random html code on home page top bar

Topic summary

  • Raw HTML is visibly appearing in the site’s top bar, positioned above the social media links.
  • The poster attempted to use an AI assistant to identify/remove the code, but it did not resolve the issue.
  • Seeking help to remove or hide the unintended markup from the header area (top bar). HTML is the webpage’s markup; seeing it means it’s being displayed as text rather than rendered as design.
  • A screenshot is attached and is central to understanding the location of the problem.
  • No suggestions, fixes, or outcomes have been shared yet; the request remains open with no resolution.
  • Key question: how to remove the stray HTML from the top bar so only the social media links appear.
Summarized with AI on February 21. AI used: gpt-5.

I’ve used the AI assistant but it can’t quite seem to figure it out to try and remove the html coding on the top bar above my social media links. Need help please!

1 Like

Of course Sidekick can’t help you, because you have a third party theme, and a third party page builder, it’s beyond its scope.

Did you try to undo whatever you did that put it there? Or look in the main theme file near the <body tag? Or revert to a theme version that doesn’t have it?

You need to share at least a preview link to this theme.
Otherwise its a guessing game.

It happened with an update to the theme file, before it wasn’t there

Look at the top of the layouts/theme.liquid

Do I remove all the rows highlighted in red?

You can always try and undo. :slight_smile:

These are:

  • CSS rule to shift down your menu (it aligns with icons without this rule)
  • Javascript code to set Store variable, but this does not seem to be used…

So I’d try to remove the 2 lines which has ```, 21 and 29 in the screenshot.

Also – adding something like below to the “Custom CSS” should help aligning social icons with text.

.top-bar .footer__heading {
  margin-bottom: -2px;
}

I was hoping removing line 21 and 29 would work but it didn’t unfortunately

Now there is also line 55 and 61.

Looks like the residuals of the update process which went not as expected. And if it is, then other files may be affected also.

I’d try to run the update process again – I have no touched their updater app in years, but I hope they do keep the original theme intact and create an updated copy.

It sounds like the top bar is displaying the HTML as text instead of rendering it.

Go to Online Store → Themes → Edit code and check the file that controls your top bar (usually header.liquid or announcement-bar.liquid). Most often, this happens because the content is being escaped (for example using | escape) or added to a plain text field instead of a rich text/HTML field.

Remove any escaping filter or move the code into the correct section, and it should render properly. If you share the exact code showing above the social links, I can point you to the exact line to adjust.