Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi Guys,
I'm trying to hide the header, announcement bar & footer on a landing page we're working on. We're using Focal theme for this and it seems like it's not as simple as it is on other themes (non dev btw 😂)
Any idea on how this can be done?
Solved! Go to the solution
This is an accepted solution.
Hi @Dutsford
TRy this one.
{% if template.name == 'index' %}
<style>
.header, div#shopify-section-announcement-bar, div#shopify-section-footer {
display: none;
}
</style>
{% endif %}
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Hey @Dutsford
Welcome to Shopify Community! Can you share your Store URL so I can have a look on it? Also, if you have password enabled then please share the password as well. Your cooperation would be greatly appreciated.
Best Regards,
Moeed
Hi Moeed!
Thanks for your quick response! URL below:
simonnewtonlondon.com
Hey @Dutsford
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
{% if template == 'index' %}
<style>
.announcement-bar, .header, footer {
display: none !important;
}
</style>
{% endif %}
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Keep the previous code and add this new code above </body> in the end of theme.liquid file
{% if page.handle == "bfcm-2024" %}
<style>
.announcement-bar, .header, footer {
display: none !important;
}
</style>
{% endif %}
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This is an accepted solution.
Hi @Dutsford
TRy this one.
{% if template.name == 'index' %}
<style>
.header, div#shopify-section-announcement-bar, div#shopify-section-footer {
display: none;
}
</style>
{% endif %}
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
when i do it with 'index' it does it on all pages, however I only need it on template name 'landing-page' but this wont work when I replace Index for some reason
Ignore me, done it!
Thanks!
Welcome, Would you mind hitting 'like' as well? Thanks!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024