Who this article is for: Plug In SEO users who want to learn how to fix issues with invalid heading (<H1>) tag which is most often caused by the logo being embedded in the heading tag. What you'll learn: You'll learn the steps on how to fix the issues causing the <H1> tag to be invalid. |
Disclaimer: If you follow these steps you're going to be making changes to the theme of your shop. Every Shopify theme is different. Your page will not look exactly like our example and we can't guarantee that the changes you make will come out exactly as described in this guide. We recommend you make a copy of your live theme before making changes to it. That way if you mess it up when editing it you can revert to the original easily and quickly. |
Offer: If you'd like to get expert help to make this change, please consider purchasing our Quick Start Service. |
Video Tutorial |
Why You See This Message:
Most Shopify themes automatically include a heading tag around your logo or store name. If your theme does this, you'll likely see this error message in Plug In SEO: SEO Heading - Invalid Tag.
Search engine crawlers like Google or Bing will ignore your heading (<H1> tag) if it’s wrapped around an image or logo.
How to Fix it
As you'll see in the video tutorial, we fix this problem in two stages. You must complete the steps in both stages so that you do not introduce new issues to your pages.
Stage 1: Edit Your Homepage Heading
Every theme is structured differently so you will first have to locate which piece of text in your theme is being defined as your heading.
- View your themes in Shopify
- Select ‘Actions’ and ‘Edit code’ for the relevant theme
- Make a Click edit code for your live theme
- Change the <H1></H1> tags to <div></div>
Example: Before Editing
Example: After Editing
Stage 2: Add a New Heading and Subheading
Changing the default H1 to DIV means that your site likely won't have an primary heading <H1> tag. In stage 2 we will add a new a new H1 heading and sub heading that are customized and optimized for your shop.
By creating a new section on your homepage you can add a new piece of text as your primary heading.
- View your themes in Shopify
- Select ‘Actions’ and ‘Edit code’ for the relevant theme
- Go to the Sections folder
- Click ‘Add a new section'
- Call it SEO-Headings
- Create section
- Delete the file content
- Add the following piece of code to the new section file
- Replace the class with the heading class from the header.liquid file (see stage 1).
- Save the new Section
- Go to ‘Customize theme’
- Add the new section called 'SEO Headings
- Move the section to the desired location on the page.
- Input your heading text to provide a summary of your products and brand. Include 2-3 of your top keywords.
<div>
<div>
{% if section.settings.heading != blank %}
<div><p><br>
<h1 class="ENTER YOUR HEADING CLASS HERE" style="line-height: 1; word-wrap: break-word;">
{{ section.settings.heading }}
</h1>
</p></div>
{% endif %}
{% if section.settings.subheading != blank %}
<div><p>
<h2 class="ENTER YOUR HEADING CLASS HERE" style="line-height: 1; word-wrap: break-word;">{{ section.settings.subheading }}
</h2></p></div>
{% endif %}
</div>
</div>
{% schema %} { "name": { "en": "SEO Headings" }, "class": "index-section", "settings": [ { "type": "text", "id": "heading", "label": { "en": "Heading" }, "default": { "en": "Add your primary heading here" } }, { "type": "text", "id": "subheading", "label": { "en": "Subheading" }, "default": { "en": "Add your subheading here" } } ], "presets": [ { "name": { "en": "SEO Headings" }, "category": { "en": "SEO" } } ] } {% endschema %}
Comments
0 comments
Article is closed for comments.