How to bring back hidden add to cart button on my homepage in Crave Theme

Topic summary

A Shopify store owner using the Crave theme needs help restoring an ‘add to cart’ button on their homepage that was previously hidden by a developer. They cannot remember which section contains the code or where it was placed.

Current Status:

  • Issue remains unresolved
  • The original poster has not confirmed whether the suggested solution worked

Proposed Solution:
A community member (BrainStation23) provided code from the Crave theme’s header.liquid file that handles cart button visibility. However, they noted they cannot verify the exact implementation without access to the store’s actual code.

Key Challenge:
The provided code snippet appears corrupted or reversed in the discussion, making it difficult to assess its accuracy. The store owner will need to locate the specific customization in their theme files to reverse the previous modification.

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

Hi, last year I ask for help from a developer in the Shopify Community to hide ‘add to cart’ button from my homepage. Then, now I want to make it appear again but I forgot where to find the code section and which code that the developer put it. I hope someone can help me or guide me to solve the issue. I’m using ‘crave’ theme.

Thank you very much.

This is the website - sugarstar.com.my

Hi @sugarstarhq . You can try the following code in your header.liquid file. As we don’t have access to the code of your header.liquid file, we can’t check it. For your information, the following code is taken from Crave theme.

{%- if shop.customer_accounts_enabled -%}

        {%- 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 -%}
      
{% endif %}

Feel free to ask any question if you have any.