Add an instantly rendering header link to your theme.
When we inject our default header link through Code Access, there will be a slight delay before it gets rendered. This is to ensure that the app has the least possible impact on your store’s performance.
This article explains how to add an instantly rendering Wishlist link to your theme’s Liquid code. We then use Code Access to convert the static element into an interactive element that automatically reacts to the Wishlist data.
Liquid code modification required
Updating your theme’s Liquid code should be done by a theme developer. Note: These changes may get lost when you update your theme.
1. Add markup to header section
Use the code below to render a basic Wishlist link in your header section. You can adjust the markup and styling to your needs.
You should now see a static header link in your online store. In the next step will turn it into a dynamic link again.
2. Setup Headless Wishlist Link
With Code Access we turn the instant but static header link into a dynamic / interactive link that is connected to the customer’s Wishlist. It will then show the state of the Wishlist and dynamically update when the Wishlist is being interacted with.
Copy and paste the below code into the “Headless Wishlist Link” tab in Code Access.