Hiding header/footer on certain pages

Topic summary

A user seeks help hiding headers and footers on three specific landing pages designed for social media campaigns. They lack coding experience and previous attempts have failed.

Two solutions proposed:

  1. Template-based approach: Create a dedicated page template by removing the {% section 'header' %} and {% section 'footer' %} lines from the template code, leaving only {{ page.content }}. Then assign this custom template to the target landing pages.

  2. CSS-based approach: Insert JavaScript code into the theme.liquid file (after the <body> tag) that uses CSS to hide header/footer elements when specific page handles are detected (e.g., ‘nashville-knights-release’, ‘love-pucked-release’, ‘author-emily-silver’).

Both methods target Shopify store customization. The discussion remains open with no confirmation of which solution was implemented or successful.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I have three landing pages I’m working on for social media that I am trying to hide the header and footer. I’m not skilled in coding and have tried adding it several times to no avail. Is anyone able to assist me?

https://authoremilysilver.com/pages/nashville-knights-release

https://authoremilysilver.com/pages/love-pucked-release

https://authoremilysilver.com/pages/author-emily-silver

Hi,

Hope this will work

  • Create a Special Page Template
  • Edit Template to Remove Header/Footer
    Once the new template opens, it’ll look something like this:
    {% section ‘header’ %}
    {{ page.content }}
    {% section ‘footer’ %}

remove the header and footer sections, so change it to:
{{ page.content }}

  • Assign This Template to Your Landing Pages

Hi @authoremilysilv ,

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code after

If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Use our Big Bulk Discount app to boost your sales! :rocket: (https://apps.shopify.com/big-bulk-discount). Easy to set up and perfect for attracting more customers with bulk discounts. Try it now and watch your revenue grow!

1 Like