How can I hide the cart button in the Craft theme header?

Topic summary

Main topic: Hiding the cart button in the Shopify Craft theme header.

Key updates:

  • The requester shared the store URL; another participant asked for a Craft theme preview link (not yet provided). One participant indicated they would check the store.

Solutions proposed:

  • Edit the theme’s header.liquid (the header template) and remove or comment the Liquid block that renders the cart icon and count (icon-cart-empty/icon-cart and cart.item_count). This removes the cart icon from the header.
  • Add a CSS rule to theme.liquid (layout file) before : set #cart-icon-bubble { display: none !important; } to visually hide the cart icon via CSS.

Notes:

  • The code snippet in header.liquid is central to understanding the direct removal method.
  • CSS approach is non-destructive and reversible; code removal is more permanent.

Status:

  • No confirmation from the requester that the issue is resolved.
  • Discussion remains open pending preview link and user feedback.
Summarized with AI on February 12. AI used: gpt-5.

I’m trying to hide the cart button in the header, but am struggling to do it on the Craft theme. Can anyone tell me where to find the section in the code? Thanks!

Hi @estillw1 ,

Could you share your store URL?

https://fityougym.myshopify.com/

A moment let me check out your store

Please share preview link of Craft theme

Hi @estillw1 ,

Please open the header.liquid file and find this code:


        {%- liquid
          if cart == empty
            render 'icon-cart-empty'
          else
            render 'icon-cart'
          endif
        -%}
        {{ 'templates.cart.cart' | t }}
        {%- if cart != empty -%}
          

            {%- if cart.item_count < 100 -%}
              {{ cart.item_count }}
            {%- endif -%}
            {{ 'sections.header.cart_count' | t: count: cart.item_count }}
          

        {%- endif -%}

Comment or delete the above code to hide the cart icon from your header.

I hope it helps.

Hi [email removed]Estillw1

This is PageFly - Free Landing Page Builder. I would love to provide my for your store based on 6 years of providing solutions for about 100.000 active Shopify merchants.

You can find theme → edit → theme.liquid

Then you can paste the code before

#cart-icon-bubble{

display: none !important;

}

If you want more flexibility to personalize your pages, I’d love to introduce our product PageFly Landing Page Builder with 24/7 support live chat. PageFly has a Free plan where you can use all features and create different page types so I hope give us a try.

If you find my comment useful, please let me know by giving it a Like. Thank you!

PageFly