Shopify Conversion Hack: How to Hide Header & Footer on Specific Pages for Laser-Focused Sales Funnels
Hey there, fellow store owners! As a Shopify migration expert and someone who spends a lot of time sifting through community discussions, I often see common challenges pop up that have really elegant solutions. One such challenge, perfectly captured by a recent thread started by John83, is the desire to create truly focused, distraction-free sales pages.
John83 was using the Horizon theme and wanted to hide the header and footer on just six specific sales pages. The problem? When he tried to toggle these sections off in the theme editor, they disappeared across his entire website. Sound familiar? It's a classic scenario, and one that the community quickly rallied to help solve!
Why Headers and Footers Go Global
The core of John83's dilemma, as several experts like Custom-Cursor and Moeed pointed out, is that the header and footer are typically global sections. They're designed to appear on every page of your store, providing consistent navigation, branding, and essential links. So, when you disable them through your theme's general settings, Shopify assumes you want them hidden everywhere. There isn't a simple "hide on this page only" toggle for these core elements built into the standard theme editor.
While this global consistency is great for most of your store, it can be a hindrance for specific pages where you want to minimize distractions and guide visitors towards a single action. Think about dedicated sales pages, lead capture forms, or "coming soon" pages. On these pages, a prominent header with navigation links or a footer with extensive legal information can pull a visitor's attention away from your primary call to action.
The Master Solution: Custom Page Templates with CSS
But don't worry! This doesn't mean you're stuck. The brilliant minds in the Shopify community quickly landed on the universally accepted best practice for this: custom page templates. This approach allows you to create specific layouts for individual pages or groups of pages, leaving the rest of your store untouched. It's a powerful feature that gives you granular control over your store's design without resorting to complex app installations or site-wide code changes.
The consensus from Custom-Cursor, ajaycodewiz, WebsiteDeveloper, and tim_tairli was clear: create a new page template, remove the header and footer from that specific template, and then assign your sales pages to use it. Our expert ajaycodewiz even provided a detailed, tested fix for the Horizon theme, which we'll expand upon here. This method is highly effective and applicable to most modern Shopify themes, as the underlying structure often uses similar CSS classes.
Step-by-Step Guide: Hiding Headers and Footers on Specific Shopify Pages
Before you begin, it's always a good practice to duplicate your theme in the Shopify admin (Online Store > Themes > Actions > Duplicate) so you can test changes without affecting your live store. Once you're confident, you can apply the changes to your live theme.
Important Prerequisite: If you had previously globally turned off your header and footer sections, turn them back on in your theme customizer. This method relies on them being globally active so that our custom template can selectively hide them.
-
Step 1: Create a New Page Template
- From your Shopify admin, go to Online Store > Themes.
- Click Customize on your current theme (or the duplicated theme you're working on).
- In the theme editor, use the template selector dropdown at the top of the page (it usually says "Home page").
- Select Pages, then click Create template.
- Name your new template something descriptive, like
sales-page-no-header-footeror simplysales. Base it on the Default page template. Click Create template.
-
Step 2: Add Custom Liquid with CSS to Hide Sections
- Once your new template (e.g.,
sales) is open in the theme editor, you'll see its sections on the left sidebar. - In the Template group, click Add section.
- Search for and select Custom Liquid.
- Drag this new Custom Liquid section to the very top of your template, just below the "Template" heading. This ensures the CSS loads early.
- Paste the following CSS code into the Liquid code box. This code specifically targets the header and footer section groups, setting their display property to
none, effectively hiding them.
- Once your new template (e.g.,
- Click Save.
-
Step 3: Assign the New Template to Your Pages
- Now that your custom template is ready, you need to assign it to the specific pages where you want the header and footer hidden.
- Exit the theme customizer and go back to your Shopify admin.
- Navigate to Content > Pages.
- Open each of your 6 (or more) sales pages one by one.
- On the right sidebar, under the Theme template section, change the dropdown from
Default pageto your newly created template (e.g.,salesorsales-page-no-header-footer). - Click Save for each page.
Customization: Keep the Announcement Bar
The code provided above hides the announcement bar along with the header. If you wish to keep your announcement bar visible while still hiding the main header and footer, use this modified CSS code in your Custom Liquid section instead:
This targets only the main header section within the header group, leaving the announcement bar untouched.
Beyond the Horizon: Why This Matters for Your Business
This seemingly small customization has a huge impact on your store's performance, especially for critical pages:
- Boost Conversion Rates: By removing navigation, you eliminate distractions, guiding visitors directly to your call to action. This is crucial for sales pages, lead generation forms, and special offers.
- Create Focused Landing Pages: Design dedicated landing pages for ad campaigns or specific promotions that are entirely focused on a single objective, without the clutter of a full e-commerce site.
- Enhanced User Experience: For specific campaigns, a streamlined page can feel more professional and intentional, improving the user's journey.
- A/B Testing Opportunities: You can create variations of these pages with and without headers/footers to test which performs better for different campaigns or audiences.
Migration Considerations for Custom Templates
As experts in Shopify migrations at Shopping Cart Mover, we often encounter custom code and templates like these. When migrating your store from another platform to Shopify, or even from one Shopify store to another, it's vital to ensure that all custom templates and their associated code are accurately transferred and configured. Our process accounts for these bespoke customizations, ensuring that your carefully optimized sales pages continue to function perfectly post-migration.
Ignoring such custom template assignments can lead to broken layouts or loss of conversion-optimized features. Always ensure your migration plan includes a thorough audit of custom theme files and page assignments.
Conclusion
Implementing custom page templates to hide headers and footers on specific Shopify pages is a powerful, yet straightforward, customization that can significantly impact your conversion rates and overall marketing effectiveness. By following these steps, you can create highly focused, distraction-free environments for your most important sales and landing pages, just like John83 aimed to do with his Horizon theme.
This solution not only addresses a common pain point but also showcases the flexibility and power of the Shopify platform when combined with a little custom CSS. If you're looking to start your own high-converting online store or optimize an existing one, Shopify offers a robust platform that empowers merchants to achieve their e-commerce goals.