Remove header & footer from specific page in cascade theme by switch

Topic summary

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:

  • Locate {% section 'header' %} and {% section 'footer' %} in theme.liquid
  • Wrap them with conditional logic using {% unless page.handle == 'PAGE-HANDLE' %}
  • Replace ‘PAGE-HANDLE’ with the actual page handle (undoc77)

Resolution:
The initial code snippets didn’t match the theme’s structure. The working solution involved:

  • Finding {% sections 'header-group' %} and {% sections 'footer-group' %} instead
  • Applying the same conditional wrapper with the page handle ‘undoc77’
  • This successfully hid both header and footer from the target page

Status: Resolved - the user confirmed the solution worked perfectly after locating the correct code sections in theme.liquid.

Summarized with AI on November 12. AI used: claude-sonnet-4-5-20250929.

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

Hi @Sweet_Savior_3

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

Hi @ThePrimeWeb

thank you for your quick reply! we managed to find a solution.

All the best

ingo