Goal: hide the header and footer on a single page in Dawn without affecting the entire site.
CSS alone hid them globally; page-specific control requires Liquid conditionals in theme.liquid.
Approach: wrap header and footer output in if/unless conditions that exclude the target page.
Examples:
Use page title: wrap the header/footer with an unless page_title == “specific page” condition to prevent rendering on that page.
Use page type: conditionally render sections ‘header-group’ only when request.page_type matches desired pages (e.g., show header unless request.page_type == ‘product’).
Key terms:
Liquid: Shopify’s templating language for theme logic.
request.page_type: Liquid object indicating the type of page (product, collection, page, etc.), useful for conditional rendering.
Action items:
Edit theme.liquid to add Liquid conditionals around header and footer.
Choose the condition by page title or by request.page_type depending on the target page.
Notes:
Code snippets are central to the solution; a reference to request.page_type documentation was provided.
No confirmation from the original poster; resolution appears open.
I am looking for a way to hide the header (and footer) on a specific page in the Dawn theme. I tried using a custom CSS code, which worked, but when I saved it, it removed the header from ALL of the pages and not just the single one I needed…
Anyone know how to hide a header without it being hidden on the whole website? I just need it “gone” for a single page.
You’ll need to use a conditional to achieve this. In the theme.liquid file, the header element will need to be wrapped in an “if” or “unless” statement that makes it so that the header doesn’t display when the specific page is loaded, something along these line: