Icons
Add the following file to your Snippets folder:
icon-heart-wishlist.liquid
Create a new snippet and paste the code below
<svg
aria-hidden="true"
focusable="false"
role="presentation"
xmlns="<http://www.w3.org/2000/svg>"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
>
<path fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" d="M16.2143 2.5C14.4143 2.5 12.8714 3.44286 11.9286 4.81429C10.9857 3.44286 9.44286 2.5 7.64286 2.5C4.81429 2.5 2.5 4.81429 2.5 7.64286C2.5 12.7857 11.9286 20.5 11.9286 20.5C11.9286 20.5 21.3571 12.7857 21.3571 7.64286C21.3571 4.81429 19.0429 2.5 16.2143 2.5Z"/>
</svg>
static-header.liquid
Copy the code below the <div class="site-header-cart"> tag
<ooo-wl-access-button>
<a href="{% if routes.root_url != '/' %}{{ routes.root_url }}{% endif %}/pages/[WISHLIST PAGE HANDLE]"style="color:currentColor;position:relative;display:flex">
{%- render 'icon-heart-wishlist' -%}
<span class="visually-hidden">{{ 'general.accessibility.open_wishlist' | t }}</span>
<ooo-wl-wishlist-count
hidden
class="site-header-wishlist--count"
block-start="-4px"
inline-end="-4px"
show-zero="false"
>
</ooo-wl-wishlist-count>
</a>
</ooo-wl-access-button>
<style>
ooo-wl-access-button a { margin-right:0.625rem; }
@media screen and (min-width: 1024px){ ooo-wl-access-button a { margin-right:1.25rem; } }
</style>
Replace [WISHLIST PAGE HANDLE] with your wishlist’s page handle
en.default.json
You will need to add the text description of the icon. To do that, add this line to the general.accessibility object:
"accessibility": {
"open_wishlist": "Open wishlist"
},
Note: do not forget to add this translation key to your other locale files.