Theme Header Doesn't Show Cart Icon in Desktop View

Topic summary

A user reports that their theme’s cart icon displays correctly in mobile view but disappears in desktop view, showing only the notification number. They also want to add a clickable “Contact” URL to the header before the “Search” link.

Solution Provided:

  • A PageFly support representative provides step-by-step code modifications to address both issues
  • Instructions involve editing the theme code by locating class="header__linklist list--unstyled hidden-pocket hidden-lap" and adding custom markup for both the cart icon and contact link
  • Code snippets are provided for insertion into specific class locations

Follow-up Issues:

  • The user successfully added the contact link but it’s not clickable despite having the correct URL
  • Questions arise about incorporating the suggested code with existing conditional statements (unless cart_type == 'page')
  • The support representative provides updated replacement code with screenshots to resolve the clickability issue

The discussion remains technical, focusing on theme customization through direct code editing in the Shopify theme files.

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

Hi,

In mobile view, our theme shows a cart icon as follows:

AndreHairRight_0-1675342551495.png

However, in desktop view, the cart disappears, leaving only the notification number (“0”):

AndreHairRight_1-1675342594992.png

How can we:

  1. Add the cart icon to desktop view?
  2. Add a “Contact” URL to the header before “Search”? Note, this isn’t a navigational menu like our other header links.

Thanks in advanced.

Hi @AndreHairRight

I’m Kate from PageFly - Landing Page Builder, I’d like to suggest this idea:

Icon cart

Step 1: You go to Online Store → Theme → action → edit code

Step 2: You find class=“header__linklist list–unstyled hidden-pocket hidden-lap”

Step 3: In this class you find class = “header__linklist-item”

Step 4: You add this code:


                  

Contact URL Before Search

Step 1: You search class=“header__linklist list–unstyled hidden-pocket hidden-lap”

Step 2: You search class= “header__linklist-item” for Contact page you coppy it

- Contact
              

Step 3: In this class you find class = “header__linklist-item”

you pass code copy before “Search”.

Hi Kate,

Many thanks for your detailed response. I have a couple of follow up questions.

When i search for class= “header__linklist-item” I find:

- {{- 'header.general.cart' | t | escape -}}

How should I incorporate the code you suggested, or is there a way I can edit this existing

  • item? My knowledge is limited but could the conditional statement here be edited?

    {% unless settings.cart_type == 'page' %}
    

    On the contact URL, i added the new list item, but the link isn’t clickable. The URL is correct, but it doesn’t click. Is there a reason for this?

    Thanks,

    Andre

  • Edit

    @AndreHairRight , Sorry for the late reply

    Please try to replace the code I highlighted in red with the code below: