Shopify themes, liquid, logos, and UX
Hello, I would like to know how I can hide the header and footer only on the homepage.
I'm using Shopify's motion theme,
thanks!
In theme.liquid, add conditions to the referenced header and footer codes.
{% if template.name == 'index' %}
{% sections 'header-group' %}
{% endif %}
-----------------------------------
{% if template.name == 'index' %}
{% sections 'footer-group' %}
{% endif %}
i already tried something like this but i didnt notice any changes, should i copy and paste it or i have to change something?
Hi @oslagod
This is Henry from PageFly - Landing Page Builder App
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file theme.liquid
Step 3: paste bellow code in tag </body> -> save.
{% if template == 'index' %}
<style>
header, footer {
display: none !important;
}
</style>
{% endif %}
Hope that my solution works for you.
Best regards,
Henry | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
i already tried something like this but didnt notice any changes, should i copy and paste it or i have to change something?
Hey 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, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024