Happening now | Shopify Community AMA: SEO Basics with 2H Media | Ask your questions now!

Hiding header and footer on one page only - Dawn Theme

Solved

Hiding header and footer on one page only - Dawn Theme

Degen
Excursionist
12 0 4

Hi guys,

 

I'm trying to create a landing page for my website that is purely just a page of text, with a button at the end that will take them to the home page. I want the customers focus to be purely on the text but I can't figure out how to remove the header and footer from ONLY my landing page whilst keeping them on the rest of the site.

 

This is a huge part of the vision I have in mind for the website so I really hope one of you geniuses can help me out.

 

Thanks in advance!

 

Accepted Solution (1)
SpeedyDev
Trailblazer
199 17 38

This is an accepted solution.

@Degen 

You can follow the instruction below:

1. Go to Online Store->Theme->Edit code
2. Layout->/theme.liquid->paste below code at the before </body>:

 

{% if template contains 'index' %}
    <style>
      .header,.footer {
      	display: none !important;
      }
    </style>
    {% endif %}

 

banned

View solution in original post

Replies 22 (22)

Savior
Shopify Partner
537 108 161

@Degen 

Hey

Can i help you with your store ? Can you please share your store URL and check and provide you a solution.

banned
Degen
Excursionist
12 0 4

@Savior 

My store is still locked at the moment, do I need to unlock it for you to help me?

Savior
Shopify Partner
537 108 161

@Degen 

 

Please share your store URL and store password NOT the admin password.

banned
Degen
Excursionist
12 0 4

 

 

URL: degen-fitness.com

 

SpeedyDev
Trailblazer
199 17 38

This is an accepted solution.

@Degen 

You can follow the instruction below:

1. Go to Online Store->Theme->Edit code
2. Layout->/theme.liquid->paste below code at the before </body>:

 

{% if template contains 'index' %}
    <style>
      .header,.footer {
      	display: none !important;
      }
    </style>
    {% endif %}

 

banned
Degen
Excursionist
12 0 4

@SpeedyDev 

 

Amazing - thank you for your speedy help!


If you have a quick look at my store now, the first page works perfect. If you go from the home page back onto the landing page, you will see that it has a footer with no escape button - do you know the reason for this?

Ideally, if they go back onto that page, it will be exactly the same as when they first load it up - with no footer and a button.

SpeedyDev
Trailblazer
199 17 38

@Degen 

Share a screenShot of it.

or on which page are you looking.

This code is only for the home page.

banned
SpeedyDev
Trailblazer
199 17 38

@Degen Button is not the part of the Footer. 
So it will appear.
you can remove that button from the Admin pannel.

banned
Degen
Excursionist
12 0 4

@SpeedyDev 

 

My bad, I got mixed up between pages! Thanks very much for your help on this problem, I really appreciate it. Have a good day!

SpeedyDev
Trailblazer
199 17 38

@Degen

 Your Welcome,
Let me know if you need any more help,

banned
Degen
Excursionist
12 0 4

@SpeedyDev 

Hey again,

Hope you don't mind me asking for some more help?

 

I'm trying to figure out whether or not there's a way to change the background colour of each specific section on my page. For instance, I'm going to write a few sections of rich text and I would love to have slightly different background colour tones on each of them so that the visitor can easily differentiate between them. Is this possible?

 

Thanks in advance 🙂

SpeedyDev
Trailblazer
199 17 38

@Degen 

Yes, Sure I would like to help you,
Let me know what are you looking? Share me screenshot,

banned
Degen
Excursionist
12 0 4

@SpeedyDev 

 

So I have two options when it comes to designing my page:

1 - Rich text with an image included beside the text.

2 - Image with text, but formatted with a smaller image.

 

On image 1, I'm really happy with the font format on the header and body text. But I would like an image to go alongside it - is this possible?

 

On image 2, this is the only way I know to get the image alongside the text, but there are a few issues. The image box is too big, so the writing section becomes too high, as oppose to being wide.  I also don't know how to change the format of the header to make it bold and red, like image 1.

Image 3, is an example of what I am trying to achieve. I know it's a lot to ask of you, but if you could help with this, I would be so grateful!

 

Let me know what you think!

Thanks

Screenshot 2022-07-14 at 08.34.15.pngScreenshot 2022-07-14 at 10.32.09.pngScreenshot 2022-07-14 at 10.31.06.png

Degen
Excursionist
12 0 4

@SpeedyDev 

Update!

I've taught myself how to edit the fonts for each section, now I would simply like to make the background of the second 'image-with-text' section all white. So the white fill the entire section, just as the grey does in the above section. Please find photo below:Screenshot 2022-07-14 at 14.55.11.png

Degen
Excursionist
12 0 4

I don't know if it's possible, but if I could spread every section to fit the whole width of the page, that would be amazing!

hanamitti
Visitor
2 0 0

Hi,

I followed the instruction. How do I go on about hiding the header and footer of a single page? Thank you!

hanamitti
Visitor
2 0 0

I added the code according to the instruction, and the header and footer disappeared on only my homepage which isn't what I want to do. I want to hide them on a landing page.

oslagod
Tourist
6 0 0

does it also work with https://www.kakakaz.com

lindleygb
Visitor
2 0 0

Hi! Any chance you can help me hider header/footer on the enterprise theme?! Thank you!

lindleygb
Visitor
2 0 0

I really just want to hide it on a single landing page

 

laragherrero
Shopify Partner
1 0 0

Hola, 

 

Yo acabo de incorporar ese código y no me hace nada, no se elimina de la home. En mi caso, quiero quitar solo el header en la home page pero que siga apareciendo en el resto de páginas. ¿Qué tengo que hacer? Mi URL es https://briealto.com/

Emporivm
Tourist
3 0 3

Hi. is is still good? and can you please explain where exactly I need to put this code