Hiding the header and footer on your landing page in shopify

we can use an unless tag to include a header section only when the current page is not the landing page. We would add this condition to our theme.liquid file, where the header section is included as {% section 'header' %}.

Header

{% unless template.suffix contains "landing-page" %}
          {% section 'header' %}
     {% endunless %}

Footer

{% unless template.suffix contains "landing-page" %}
          {% section 'footer' %}
     {% endunless %}

Leave a comment

Your email address will not be published. Required fields are marked *