hi there,
i´m using the cascade theme by switch. I would like to remove the header and the footer from one specific page (not from all pages). how can i do that? The page name is: 77undco
thanks in advance and all the best
ingo
A user seeks to remove the header and footer from a specific page (undoc77) in the Cascade theme by Switch, while keeping them on all other pages.
Initial Solutions Proposed:
{% section 'header' %} and {% section 'footer' %} in theme.liquid{% unless page.handle == 'PAGE-HANDLE' %}Resolution:
The initial code snippets didn’t match the theme’s structure. The working solution involved:
{% sections 'header-group' %} and {% sections 'footer-group' %} insteadStatus: Resolved - the user confirmed the solution worked perfectly after locating the correct code sections in theme.liquid.
hi there,
i´m using the cascade theme by switch. I would like to remove the header and the footer from one specific page (not from all pages). how can i do that? The page name is: 77undco
thanks in advance and all the best
ingo
@ingo77 - does this page has unique id or class? can you share this page link?
Hello @ingo77
Open theme.liquid file and search for {% section ‘header’ %}
Replace it with below code:
{% unless page.handle == 'PAGE-HANDLE' %}
{% section 'header' %}
{% endunless %}
Similarly search for {% section ‘footer’ %}
and replace it below code:
{% unless page.handle == 'PAGE-HANDLE' %}
{% section 'footer' %}
{% endunless %}
Simply replace PAGE-HANDLE in the given code with your page handle i,e 77undco. You can find the page handle like this /pages/77undco.
Thanks
Hey @ingo77 ,
Could you share the link to this page please? Thank you!
You can share the page as a preview link if it’s not published!
hi suyash, the page is not published yet: https://arty.gallery/pages/77undco
@ingo77 - password to view page?
the password is: starty@arty
thanks in advance!
hello Sweet Savior 3,
Thank you very much for your quick reply. Unfortunately I wasn’t able to find the exact code: {% section ‘header’ %} in liquid. it will be due to my inexperience…
Thanks anyway for your detailed answer!
ingo
Hello @ingo77
Then try to check for {% sections ‘header-group’ %} and {% sections ‘footer-group’ %}
And replace theme with below:
{% unless page.handle == '77undco' %}
{% sections 'header-group' %}
{% endunless %}
{% unless page.handle == '77undco' %}
{% sections 'footer-group' %}
{% endunless %}
Thanks
thanks again for your effort! I managed to find the right part of the code today. Your solution worked perfectly!
Thanks and all the best
ingo