All things Shopify and commerce
I currently have a three level menu and only the deepest level is clickable. I looked through the community for solutions and did not find the code they mentioned in the header.liquid file.
Hi,
Which theme are you using ?
Was this helpful? Like or Accept solution - Buy me a coffee ☕️
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed
Refresh
Try this :
For the top-level menu items, you need to modify the header-dropdown-menu.liquid file:
From your Shopify admin, go to Online Store > Themes
Find your Refresh theme, click the "..." button and select "Edit code"
Open the file snippets/header-dropdown-menu.liquid
Look for a code block that looks like this:
<summary id="HeaderMenu-{{ link.handle }}" class="header__menu-item list-menu__item link focus-inset"> <span {%- if link.child_active %} class="header__active-menu-item" {% endif %}> {{- link.title | escape -}} </span> {% render 'icon-caret' %} </summary>
<summary id="HeaderMenu-{{ link.handle }}" class="header__menu-item list-menu__item link focus-inset"> <a href="{{ link.url }}" style="text-decoration: unset;"> <span {%- if link.child_active %} class="header__active-menu-item" {% endif %}> {{- link.title | escape -}} </span> </a> {% render 'icon-caret' %} </summary>
For the second-level menu items, you need to modify the header.liquid file:
In the theme editor, open the header.liquid file
Find the section with the "header__menu-item" class
Look for code similar to:
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}> {{ link.title | escape }} </span>
Replace it with this code (or similar code):
<span {%- if link.child_active %} class="header__active-menu-item"{% endif %}> <a href="{{ link.url }}" style="color: rgb(var(--color-foreground));text-decoration: none;"> {{ link.title | escape }} </a> </span>
Here, we are wrapping the {{ link.title | escape }} within an <a href="{{ link.url }}"> tag inside the <span> element. Inline styles are added to maintain the text color and remove text decoration.
Was this helpful? Like or Accept solution - Buy me a coffee ☕️
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025