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
380 57 55

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.team@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 6 (6)

Dan-From-Ryviu
Shopify Partner
8566 1690 1699

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 -%}

- Helpful? Like and Accept solution!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

Jodiebe
Excursionist
16 0 3

Thank you!

PageFly-Henry
Shopify Partner
1184 335 283

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
380 57 55

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.team@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
380 57 55

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

Brain Station 23 PLC (Mail: js.team@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