Remove header from Password Page

Karti1
Visitor
3 0 0

Id like to remove the header and the footer on my password page. How do I do this? I am making sure I like the theme, so it has not been published. My goal is to have my landing page be a video that plays automatically. It seems thats only possible through the password page. 

Replies 3 (3)

Liam
Shopify Staff
2731 302 783

Hi Karti1,

 

Which theme are you using? Any themes on the Shopify Theme Store will use a unique layout file for their password page that does not include a header or footer.

 

Alternatively, if you're comfortable with editing theme code, you could create a landing page that doesn't render a header and footer by customising the `theme.liquid` file where the header and footer sections are included. For example if you wanted to hide the header on the home page, you could set up conditions using the template object where the header sections group will only render on templates other than the index template:

 

 

 

{%  unless template == 'index' %}
  {% sections 'header-group' %}
{%  endunless %}

 

 

You could set up something similar for individual pages using the page handle object instead of the template object, eg:

 

 

{%  unless page.handle == 'name-of-the-page' %}
  {% sections 'header-group' %}
{%  endunless %}  

 

 

Using this technique alongside web pages with metaobjects will also offer some very powerful options for building landing pages, and depending on the theme you're using you'll be easily able to add a video section.  

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Karti1
Visitor
3 0 0

Hi Liam, 

thanks for the answer, I think I'd like to do the first option you gave. I actually just want to remove the footer from my homepage. Would I apply that code where it says "custom CSS" on the customization tab? or would that be the 'theme.liquid' under the "edit code" option?

Liam
Shopify Staff
2731 302 783

Hi again Karti1,

 

You'd be making the change to the theme code through the "edit code" option on the themes page, and you'd be editing the `theme.liquid` file in the /layouts directory. Keep in mind you can duplicate your theme and make changes to an unpublished version of your theme so you can preview changes safely. 

 

If you're using the Dawn theme, this is how the code that includes the header looks like, and other themes should follow a similar approach. Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog