Shopify themes, liquid, logos, and UX
I’m using the Dawn theme and would like to hide the header and footer for the blog and blog posts only.
Currently, if I hide the header and footer it hides it for the whole site.
Is there some code that can make this change?
Thanks!
Solved! Go to the solution
This is an accepted solution.
Hi @Jodiebe
You can follow these steps to achieve your result
Go to online store->Edit code-> theme.liquid
Then add the bellow code to the theme.liquid file after<head> and save
{%- if template.name == 'blog' or template.name == 'article' -%}
<style>
footer, .section-header {
display: none !important;
}
</style>
{%- endif -%}
Hi @Jodiebe
Dan here from Ryviu: Product Reviews & QA app.
You can do that by adding this code to theme.liquid file after <head> and save file
{%- if template.name == 'blog' or template.name == 'article' -%}
<style>
footer, .section-header { display: none !important; }
</style>
{%- endif -%}
- Found this helpful? Hit "Like" and "Accept as Solution"! - Feeling generous. ☕ Buy me coffee!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify
Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Thank you!
Hi @Jodiebe
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 contains 'blogs' or template contains 'article' %}
<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.
This is an accepted solution.
Hi @Jodiebe
You can follow these steps to achieve your result
Go to online store->Edit code-> theme.liquid
Then add the bellow code to the theme.liquid file after<head> and save
{%- if template.name == 'blog' or template.name == 'article' -%}
<style>
footer, .section-header {
display: none !important;
}
</style>
{%- endif -%}
Brilliant - that worked. Thank you so much!
Hi @Jodiebe
You're welcome.
If your solution work, please like and marked as accepted solution.
Hello @BrainStation23 I am after the same solution but for the template Combine 2.3.1
I tried inserting the code you suggested but it didn't work. I think it might be because my blog posts are saved under a particular blog category which I have named 'rsvp' (also what I named the template), I tried tweaking the code so that it used template.name == 'rsvp' but that didn't work. My other suspicion is that the header and footer sections are perhaps named differently in this template.
When I search for 'header' or 'footer' in the theme.liquid - it always displays as 'header-group' or 'footer-group' as you can see below.
I've also included a screenshot to show the URL handle if that is helpful. If you prefer me to start a new thread for this, I'm happy to. Otherwise I have already got a thread here which has no solution marked so far: https://community.shopify.com/c/shopify-design/how-do-i-remove-the-header-and-footer-from-a-specific...
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025