How to remove an open h2 tag from the top of blog pages?

Topic summary

A stray “open h2 tag” was rendering at the top of only blog pages on a Shopify store. A screenshot illustrated the issue; the site link was provided.

Initial guidance suggested the error stemmed from theme code and recommended reverting the blog template to a previous version via Online Store > Themes > Edit code, or hiring a Shopify Expert if no revert was available.

The store owner noted no recent code changes and no prior versions for blog-related files.

A concrete fix was provided: add a Liquid conditional in theme.liquid above :

  • {% if template contains ‘article’ %}{% endif %}
    This targets article (blog post) templates and effectively prevents the problematic output from appearing on those pages. Alternative suggestion: locate the breadcrumb file and remove the error there.

Outcome: The added Liquid snippet resolved the issue; the owner confirmed success. The thread is resolved.

Key terms:

  • theme.liquid: main layout file in a Shopify theme.
  • Liquid: Shopify’s templating language.
  • breadcrumb: navigational trail element; potentially the source of the bad tag.
Summarized with AI on January 4. AI used: gpt-5.

Can someone please help me remove this open tag at the top of the page? It only appears on blog pages

https://yourlifeinalignment.com/

skowck

That would be error within your theme’s coding. You most likely tried to make some changes to the theme’s coding, and made a mistake. There wouldn’t be any way for someone to help you without seeing your theme’s coding.

You could try going into your admin > online store > themes > click the “…” dropdown > edit coding > click into the coding for your blog > select the drop-down at the top, and revert the coding to a previous date (where the coding wasn’t broken).

Otherwise, your best bet would be to hire a Shopify Partner/Expert to go into the coding for you, find the broken bits, and then remove it (or revert changes manually for you).

I haven’t made any changes to coding and looking at the code sections for the blog, none of them have previous versions.

Hi @lillylove

This is Richard from PageFly - Shopify Page Builder App

Please add this code to your theme.liquid above the to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the

{% if template contains 'article' %}

{%endif%}

Or you can try to find the file for breadcrumb and remove the error inside it

Hope this can help you solve the issue

Best regards,

Richard | PageFly

1 Like

This worked! Thank you so much!

Glad that i can help