Hi there I want to hide the footer and header on this specific page without hiding it on other pages how do I do that?
This page:/vaire®-starter-kit-copy?_pos=2&_psq=starter&_ss=e&_v=1.0
You can hide the header and footer on a specific page in Shopify by adding conditional Liquid code in your theme.liquid file or by injecting CSS conditionally. Here’s a clear step-by-step method based on best practices:
Open the layout/theme.liquid file.
Locate the code that outputs the header and footer. It usually looks like:
{% section 'header' %} ... {% section 'footer' %}
or
{% sections 'header-group' %} ... {% sections 'footer-group' %}
{% unless page.handle == 'landing-page' %}
{% section 'header' %}
{% endunless %}
{% unless page.handle == 'landing-page' %}
{% section 'footer' %}
{% endunless %}
This means the header and footer will be hidden only on the page with handle landing-page.
If you prefer to keep the sections rendered but hide them visually:
{% if page.handle == 'landing-page' %}
{% endif %}
Replace ‘landing-page’ with your actual page handle.
Click on the page you want to target.
Look at the URL in your browser; the last part after /pages/ is the handle.
For example, if the URL is https://yourstore.com/pages/landing-page, the handle is landing-page.
{% unless template.name == 'product' %}
{% section 'header' %}
{% section 'footer' %}
{% endunless %}
{% unless page.handle == 'landing-page' or page.handle == 'another-page' %}
{% section 'header' %}
{% section 'footer' %}
{% endunless %}
If you want, I can support you write the exact code snippet for your specific page or theme.
Method 2 kinda worked but it hid all headers and footers on all pages
Method 2 would be the best to avoid theme code modification as you can put the code into “Custom liquid” section in your Footer group, rather then editing code. Note that you need to amend the condition to match your page.
However, the best option is to create a special template for the page in question and add a “Custom liquid” section only in this template with
code like this:
This code will only apply to this template and the page you’ve assigned it to.