Hide Nav Bar on Certain Pages Shopify - A complete Guide

Hide Nav Bar on Certain Pages Shopify - A complete Guide

How to Hide the Navigation Bar on Specific Shopify Pages

Sometimes, you might want to hide the navigation bar on specific pages of your Shopify store such as the Thank You page, Gift Card page, or a focused landing page to create a clean, distraction-free experience. 

In other cases, you may want to display a different header entirely on certain pages to match the purpose or tone of the content. Customizing the navigation like this can help improve user experience and boost conversions. 

No third-party apps or complex tools required, I’ll walk you through two easy methods to either hide or change the navigation bar using Shopify’s built-in code editor.

 

What is the Navigation Bar in Shopify?

Navigation bar is the area in your Shopify store where you can add your Logo, menus, cart, search bar. All these details are included in the header.liquid file of the theme. Nav bar is the navigation area from where user can navigate between different pages using the different links in the form of menus or icons. 

 

Methods to hide Nav bar in Shopify

There are 2 methods to hide the Nav bar in Shopify

  1. Hide Navbar Using Page Handles
  2. Hide Navbar Using different Layout in Shopify

 

Method 1: Hide Navbar Using Page Handles

Page handles are unique for each template like product, collection, cart etc. Base on these handles you can hide the Nav bar from specific pages using Theme code in liquid. Page handles use to taget the specific template to show or hide the Nav bar. Follow these steps to show or hide the navbar on different pages.

Step 1: Navigate to Online store > Themes > Edit code

Step 2: Go to the layout/theme.liquid file.

Step 3: Search for the following options depending on the theme.

  1. {% section ‘header’ %} or 
  2. {% sections 'header-group' %}

Step 4: Add conditions here based on the page handle. For example if you want it to hide from the product page add this code into your theme.liquid file.

  
    {% unless template.name == 'product' %}
        {% sections 'header-group' %}
    {% endunless %}
  

If you want to hide it from the cart page then add this code.

  
    {% unless template.name == 'cart' %}
        {% sections 'header-group' %}
    {% endunless %}
  

Step 5: Click Save.

For more on product page customization, read our tutorial on: How To Make Products View Only on Shopify.

 

Method 2: Hide Navbar Using different Layout in Shopify

In this method you can use separate layout file for certain pages and assign to those pages to hide the Nav bar. You have to create the new layout file for examplpe custom-layout.liquid and make sure to not add the Nav bar releated code in this file. Follow these steps to add a new layout and assign to the different pages where you want to hide the navigation bar.

Step 1: Navigate to Online store > Themes > Edit code

Step 2: Go to the layout and create a new file custom-navbar.liquid file.

Step 3: Copy the code from the theme.liquid file and paste in the new file you created.

Step 4: in the new file remove the code related to navbar. For example, remove this code.

  
    {% sections 'header-group' %}
  

Step 5: Click Save.

Step 6: Navigate to your desired template for example product template layout/ product.json file 

Step 7: Add this line at the top of the file like in the screenshot

  
    "layout": "custom-navbar",
  

Step 8: Click Save.

For extra inspiration, you can also browse UXCams’s guide to improving user experience.

 

Conclusion

Hiding the navigation bar on specific Shopify pages is easier than it sounds. Whether you use a quick page handle condition or create a completely separate layout, both methods give you more control over how your store looks on different pages.

If you need expert implementation, our Shopify services can set it up for you seamlessly.

Frequently Asked Questions

It's the top section of your store where you typically find the logo, menu, cart, and search icons. It's usually coded in the header.liquid file.

Yes! You can use Shopify’s page handle conditions (template.name) to hide the navbar on pages like product, cart, or thank you pages.

Not at all. If you’re comfortable with basic code edits, you can follow either method in this guide without needing a developer.

It gives you more flexibility. You can create a fully custom layout for certain pages without affecting the rest of your store.

No, removing the header section won’t break responsiveness—but be sure your content still looks good without it.

Yes! Just wrap both the header and footer code in conditional statements, or remove both from the custom layout file.

Comments(0)
You don't have any comments yet

Are You Looking for a Shopify Expert?

We design, develop, optimize, and scale high-converting Shopify stores.

Get in touch
Let's Connect
Shopify Plus eCommerce Development Agency ecomx agency

Looking for a Trusted Ecommerce & Shopify Plus Agency?

We design, develop, optimize, and scale high converting Shopify Ecommerce stores that drive sales.

Get in Touch
Ecomx shopify plus agency about us page Yasin

Looking for a Shopify expert to handle a small task? Shopify Migration Experts Agency Ecomx shopify plus agency

Let’s talk about your project

Shopify Custom Theme Development Services Live Chat