Hide hamburger and cart

Topic summary

A user needed to hide the hamburger menu and cart icons on mobile view after successfully hiding them on desktop.

Solution Provided:

  • Navigate to Online Store → Theme → Edit code
  • Open the theme.liquid file
  • Add CSS code before the </body> tag targeting mobile devices (max-width: 767px)
  • Use display: none !important to hide .site-nav--mobile .icon-hamburger and .site-nav--mobile .icon-cart elements

Outcome:
The original poster confirmed the solution worked after struggling for several hours. An alternative suggestion involved placing code below the <head> tag, though the accepted solution used the </body> placement method.

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

Hi everyone,

I want to hide the hamburger menu and cart from my website when visiting on mobile. I was able to do this myself for the desktop view, but for some reason I’m struggling with the mobile view. Any help would be greatly appreciated.

https://www.freejogger.com

Hello @Freejogger

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

@media (max-width: 767px) { .site-nav--mobile .icon-fallback-text { display: none !important; } }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution

2 Likes

Hey @Freejogger ,

Go to your theme’s “Edit Code” Option, then in the search bar type “theme.liquid”
Below the tag “” tag paste the following. Screenshot attached for reference.


Screenshot is for reference only, the correct code to paste is the one shown above.

Thanks @niraj_patel !! You saved me after trying for several hours :+1:

welcome @Freejogger :grin: