Change cart and search icon to text in header

Topic summary

Main issue: Replace cart and search icons with text in the Shopify Dawn theme header.

Proposed steps:

  • Search: In Snippets > header-search.liquid, replace the code around lines 15–20 with the text label (e.g., “Search”).
  • Cart: In Sections > header.liquid, replace the icon-render block around lines 331–337 with the text label (e.g., “Cart”). The original block conditionally renders ‘icon-cart-empty’ or ‘icon-cart’.

Follow-up outcomes:

  • After changes, “Search” appears underlined for the original poster; they asked how to remove the underline.
  • Another participant is unsure exactly what to replace and requests before/after code examples. They report the cart disappeared after their edit and that the “Search” text is too large for the button.

Status: Guidance provided, but implementation issues remain unresolved (underline styling, precise code replacement, text sizing). Participants seek clearer instructions to avoid breaking the cart link and to control text appearance.

Notes: Code snippets and exact line references are central to understanding and applying the changes.

Summarized with AI on January 2. AI used: gpt-5.

How do i change the cart and search icons so i just have the text written out?

I use the dawn theme

Hello @victorialoekke ,

  1. Search
    Edit file header-search.liquid, you can find this file under Snippets
    Here in this file check code line no. 15-20 and replace it with text “Search” or the text you need.

        
  1. Cart

Edit file header.liquid, you can find this file under Sections
Here in this file check code line no. 331-337 and replace it with text “Cart” or the text you need.

{%- liquid
          if cart == empty
            render 'icon-cart-empty'
          else
            render 'icon-cart'
          endif
        -%}

Thanks

1 Like

Thank you so much!

But now Search is underlined - how do i remove it?

Hi there sorry if this sounds a silly question. But what exactly do I replace with “Text” and “Search”? Can I see a before and after of the code? I’ve just done this and now my cart has disappeared and the “Search” text is too big for the button.