I think I’ve tried all the solutions to remove the header and footer from a page template, but none of them have worked! I’m using Envy theme 2.0. I have tried the following in the theme.liquid:
(above /head)
{% if template contains ‘email-signup’ %}
announcement-bar, header, footer {display: none !important;}
{% endif %}
or (above /head)
{% if page.handle contains ‘signup’ %}
.header {
display: none !important;
}
.announcement-bar {
display: none !important;
}
.footer {
display: none !important;
}
{% endif %}
or (in the body)
{% unless template contains ‘page.email-signup’ %}
{% section ‘announcement-bar’ %}
{% section ‘header’ %}
{% endunless %}
and variations of
– page.title contains ‘email list sign-up’
– template.name == ‘email-signup’
the page template I want to remove it on is ‘email-signup’, the URL is /pages/signup, the page title is ‘email list sign-up’
Please help!
unfortunately, that isn’t the solution. I get a message saying the section selectors are not supported, I don’t think CSS is the solution.
Unfortunately, that didn’t work either. I wonder if it is something to do with the way the theme – Envy – is structured. The solutions I’ve tried, and the ones you have offered, make sense, but they just don’t work.
Hello @Abby_CLS
Try this
Insert the following code at the top of your theme.liquid file, just before the closing tag:
{% if template contains ‘page.signup’ %}
.announcement-bar, .header, .footer {
display: none !important;
}
{% endif %}
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Unfortunately, no joy. I tried changing the ‘page.signup’ to all the other variations it could possibly be just in case. I have contacted the theme developer for some support, because these valid suggestions don’t seem to be working.
I’ve triple checked that my syntax is correct!
1 Like
Hi @Abby_CLS
Please share your store URL and password.
So that I will check and let you know the exact solution here.
Hi @Abby_CLS
Do you have the URL of the page where you would like to remove those sections?
I’m happy to provide the URL, but as it’s a client store, I’m not comfortable granting access without permission. I understand this makes it more difficult. I was unable to get any help from Eight Themes as per Shopify rules.
https://kuddlykids.com.au/pages/signup
Basically, we want this page to just be the email signup form and nothing else, like a landing page.
Hi @Abby_CLS
Go to store admin > Online Store > Themes > Edit code > open theme.liquid file, add this code after
{% if page.id == 93645635650 %}
{% endif %}
1 Like
Amazing! It worked – thank you!
1 Like