H1 Tag Debut Theme

Highlighted
Tourist
9 0 1

Good morning,

I keep getting an audit which reflects that there is no H1 tag on my store's homepage.    I have not been able to locate a solution confirmation.   The closest one recommended I replace H2 class with H1.  However, I have a video on my homepage and do not know if this is possible.  Can someone take a look at the code below?


Thank you in advance!

Britta

 

 

 

<div class="hero__text-wrap">
<div class="page-width">
<div class="hero__text-content {{ section.settings.text_align }}">

{% if section.settings.video_url contains 'vimeo.com' %}
<button type="button" id="VimeoTrigger-{{ section.id }}" class="vimeo-mobile-trigger medium-up--hide">
{% include 'icon-play' %}
</button>
{% endif %}

{% unless section.settings.title == blank %}
<h2 class="h1 hero__title">
<div class="animation-cropper"><div class="animation-contents">
{{ section.settings.title | newline_to_br }}
</div></div>

0 Likes
Highlighted

Hello @BBKIRT 

You want to <h1> tag on home page then just to change of check in header.liquid file following code.

Default <h1> tag is assigned to logo on home page. Please check

<h1 class="h2 site-header__logo">
           <a href="/" class="site-header__logo-image">
                      <img class="js lazyautosizes lazyloaded" data-src="img_url>
              <noscript> 
                <<img src="img_url"
          		alt="image alt name"
          		class="logo-image"
         		itemprop="logo">
              </noscript>
            </a>            
          </h1>

Hope this will work for you.
Thanks!

Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Tourist
9 0 1

Hi there and thank you! 

 

I do not see the code you have shared.   Here is what I am looking at from header.liquid.    Is the code you shared something I need to add?

 

{%- assign main_menu = linklists[section.settings.main_menu_link_list] -%}

{%- assign logo_alignment = 'left' -%}
{% if section.settings.main_menu_alignment == 'center-left' or section.settings.main_menu_alignment == 'center-split' or section.settings.main_menu_alignment == 'center' or section.settings.main_menu_alignment == 'center-drawer' %}
{%- assign logo_alignment = 'center' -%}
{% endif %}

{% include 'drawer-menu' %}
{% include 'cart-drawer' %}

{%- assign template_name = template | replace: '.', ' ' | truncatewords: 2, '' | handle -%}

{%- assign sticky_header = false -%}
{% if section.settings.header_style == 'sticky' %}
{%- assign sticky_header = true -%}
{% endif %}
{%- assign overlay_header = false -%}
{%- assign has_logo = false -%}
{% if template_name == 'index' and section.settings.sticky_index %}
{%- assign overlay_header = true -%}
{% endif %}
{% if template_name == 'collection' and collection.image and section.settings.sticky_collection %}
{%- assign overlay_header = true -%}
{% endif %}

{% style %}
.site-nav__link,
.site-nav__dropdown-link {
font-size: {{ section.settings.type_navigation_size }}px;
}

{% if section.settings.type_navigation_size < 18 %}
.site-nav__link {
padding-left: 8px;
padding-right: 8px;
}
{% endif %}
{% endstyle %}

<div data-section-id="{{ section.id }}" data-section-type="header-section">
<div class="header-wrapper{% if overlay_header %} header-wrapper--sticky is-light{% endif %}">

{% if section.settings.show_announcement %}
{% include 'announcement-bar' %}
{% endif %}

<header class="site-header{%if section.settings.type_navigation_style %} site-header--heading-style{% endif %}" data-sticky="{{ sticky_header }}">
<div class="page-width">
<div
class="header-layout header-layout--{{ section.settings.main_menu_alignment }}"
data-logo-align="{{ logo_alignment }}">

{% if logo_alignment == 'left' %}
<div class="header-item header-item--logo">
{% include 'header-logo-block' %}
</div>
{% endif %}

{% if logo_alignment == 'left' and section.settings.main_menu_alignment != 'left-drawer' %}
<div class="header-item header-item--navigation{% if section.settings.main_menu_alignment == 'left-center' %} text-center{% endif %}">
{% include 'header-desktop-nav' %}
</div>
{% endif %}

{% if logo_alignment == 'center' %}
<div class="header-item header-item--left header-item--navigation">
{% if section.settings.main_menu_alignment == 'center' or section.settings.main_menu_alignment == 'center-split' %}
{% if section.settings.header_search_enable %}
<div class="site-nav medium-down--hide">
<a href="/search" class="site-nav__link site-nav__link--icon js-search-header js-no-transition">
{% include 'icon-search' %}
<span class="icon__fallback-text">{{ 'general.search.title' | t }}</span>
</a>
</div>
{% endif %}
{% endif %}

{% if section.settings.main_menu_alignment == 'center-left' %}
{% include 'header-desktop-nav' %}
{% endif %}

<div class="site-nav{% unless section.settings.main_menu_alignment == 'center-drawer' %} large-up--hide{% endunless %}">
<button
type="button"
class="site-nav__link site-nav__link--icon js-drawer-open-nav"
aria-controls="NavDrawer">
{% include 'icon-hamburger' %}
<span class="icon__fallback-text">{{ 'general.drawers.navigation' | t }}</span>
</button>
</div>
</div>

{% if section.settings.main_menu_alignment == 'center-split' %}
{% include 'header-split-nav' %}
{% endif %}

{% if section.settings.main_menu_alignment != 'center-split' %}
<div class="header-item header-item--logo">
{% include 'header-logo-block' %}
</div>
{% endif %}
{% endif %}

<div class="header-item header-item--icons">
{% include 'header-icons' %}
</div>
</div>

{% if section.settings.main_menu_alignment == 'center' %}
<div class="text-center">
{% include 'header-desktop-nav' %}
</div>
{% endif %}
</div>
<div class="site-header__search-container">
<div class="site-header__search">
<div class="page-width">
<form action="/search" method="get" class="site-header__search-form" role="search">
{% if settings.search_results == 'products' %}
<input type="hidden" name="type" value="product">
{% endif %}
<button type="submit" class="text-link site-header__search-btn">
{% include 'icon-search' %}
<span class="icon__fallback-text">{{ 'general.search.submit' | t }}</span>
</button>
<input type="search" name="q" value="{{ search.terms | escape }}" placeholder="{{ 'general.search.placeholder' | t }}" class="site-header__search-input" aria-label="{{ 'general.search.placeholder' | t }}">
</form>
<button type="button" class="js-search-header-close text-link site-header__search-btn">
{% include 'icon-close' %}
<span class="icon__fallback-text">{{ 'general.accessibility.close_modal' | t | json }}</span>
</button>
</div>
</div>
</div>
</header>
</div>
</div>

{% schema %}
{
"name": "Header and menus",
"settings": [
{
"type": "link_list",
"id": "main_menu_link_list",
"label": "Menu",
"default": "main-menu"
},
{
"type": "select",
"id": "main_menu_alignment",
"label": "Logo alignment",
"default": "left",
"options": [
{
"value": "left",
"label": "Logo left, menu left"
},
{
"value": "left-center",
"label": "Logo left, menu center"
},
{
"value": "left-drawer",
"label": "Logo left, menu drawer"
},
{
"value": "center-left",
"label": "Logo center, menu left"
},
{
"value": "center",
"label": "Logo center, menu below"
},
{
"value": "center-drawer",
"label": "Logo center, menu drawer"
}
]
},
{
"type": "select",
"id": "header_style",
"label": "Header style",
"default": "normal",
"options": [
{
"value": "normal",
"label": "Normal"
},
{
"value": "sticky",
"label": "Sticky"
}
]
},
{
"type": "checkbox",
"id": "sticky_index",
"label": "Overlay header over homepage",
"default": false
},
{
"type": "checkbox",
"id": "sticky_collection",
"label": "Overlay header over collection",
"info": "(if collection image is enabled)",
"default": false
},
{
"type": "checkbox",
"id": "header_search_enable",
"label": "Show search icon"
},
{
"type": "header",
"content": "Typography"
},
{
"type": "range",
"id": "type_navigation_size",
"label": "Text size",
"default": 18,
"min": 12,
"max": 40,
"unit": "px"
},
{
"type": "checkbox",
"id": "type_navigation_style",
"label": "Use heading font"
},
{
"type": "header",
"content": "Announcement bar"
},
{
"type": "checkbox",
"id": "show_announcement",
"label": "Show an announcement"
},
{
"type": "text",
"id": "announcement_text",
"label": "Announcement text",
"default": "Free shipping and returns",
"info": "When closed, the announcement will remain closed until the next visit. Change the text to see it again."
},
{
"type": "url",
"id": "announcement_link",
"label": "Announcement link"
},
{
"type": "checkbox",
"id": "announcement_closable",
"label": "Allow users to close announcement"
}
],
"blocks": [
{
"type": "logo",
"name": "Logo",
"limit": 1,
"settings": [
{
"type": "image_picker",
"id": "logo",
"label": "Logo"
},
{
"type": "image_picker",
"id": "logo-inverted",
"label": "White logo",
"info": "Used when on top of an image"
},
{
"type": "range",
"id": "desktop_logo_width",
"label": "Desktop logo width",
"default": 200,
"min": 100,
"max": 400,
"step": 10,
"unit": "px"
},
{
"type": "range",
"id": "mobile_logo_width",
"label": "Mobile logo width",
"default": 140,
"min": 60,
"max": 200,
"step": 10,
"unit": "px",
"info": "Set as a max-width, may appear smaller"
}
]
}
],
"default": {
"settings": {}
}
}
{% endschema %}

0 Likes