I’m trying to hide the header, footer and announcement bar on a single /page with page id 139152523573
I’m using Dawn 15.0.0 theme
How can I do this? I tried using the below code after in theme.liquid, but it didn’t work…
{% if page.id == 139152523573 %}
#shopify-section-announcement-bar,
#shopify-section-header,
#shopify-section-footer {
display: none !important;
}
{% endif %}
Hello @MathewJ ,
Seems correct but if not working try to use with page handle
{% if page.handle == 'your-page-handle' %}
{% endif %}
Replace ‘your-page-handle’ with actual value
e.g. my page url is example.com/pages/about-me
in this case my page handle is ‘about-me’ and my value should be ‘about-me’
Thanks
Hi Guleria,
Thanks for the advice. Unfortunately it still doesn’t hide the three elements. I’m added code to theme.liquid file just below
Any idea why?
Code is 100% correct. You need to crosscheck the css selector
#shopify-section-announcement-bar, #shopify-section-header, #shopify-section-footer
In your page html exists with these selectors ?
Hi @MathewJ
Please update your code to this and check again
{% if page.id == 139152523573 %}
{% endif %}
Hi Dan, that seemed to work! Thanks mate
1 Like
Dan’s solution seemed to work. Looks like .shopify-section-group-header-group, is the correct format, and announcement bar is part of section header group