How to hide header and footer in Dawn theme blog posts?

Solved

How to hide header and footer in Dawn theme blog posts?

Jodiebe
Excursionist
16 0 3

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!

Accepted Solution (1)

BrainStation23
Shopify Partner
416 62 61

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 -%}
Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps

View solution in original post

Replies 7 (7)

Dan-From-Ryviu
Shopify Partner
11345 2223 2392

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.

Jodiebe
Excursionist
16 0 3

Thank you!

PageFly-Henry
Shopify Partner
1184 335 297

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.

PageFlyHenry_0-1709869629819.png

 


{% 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.

BrainStation23
Shopify Partner
416 62 61

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 -%}
Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
Jodiebe
Excursionist
16 0 3

Brilliant - that worked. Thank you so much!

BrainStation23
Shopify Partner
416 62 61

Hi @Jodiebe 
You're welcome.
If your solution work, please like and marked as accepted solution.

Brain Station 23 PLC (Mail: js.sbu@brainstation-23.com)
- Was your question answered? Mark it as an Accepted Solution
- Did the solution not address your concern? We kindly request that share or mail your store URL with us this will enable us to collaborate more closely.
- Explore our Shopify public apps
Oteeum
Tourist
20 0 3

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.

Screenshot 2025-01-30 at 12.59.04 PM.png


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...

Screenshot 2025-01-30 at 1.00.15 PM.png