Adding custom icons

Hi all,

is it possible at all to add custom icons to e.g. the label theme?
I added a new snipped with a custom svg code named icon-product-bluebox.liquid. How can I make that one appear in the drop down boxes in the theme editor?

Best,
Ephraim

Hi Ephraim,
There are a few steps to achieve this.

Firstly, you will need to edit the main-product.liquid file and around line 450 you will see a code block listing icon names that are used with the theme. You will add your icon name to the end of the list, following the same naming conventions of the other icons:

You will need to browse the file for similar blocks of icon lists and add your icon to those lists as well.

Finally, you will add a new when case to the product-icon.liquid file where you will add the same icon name added earlier, along with your svg code:

Once this has been completed, your icon should be available for use.

Let us know if you run into any issues.

Best Regards,

awesome, this works great! Many thanks for pointing this solution out!

Always happy to help out, Ephraim :slight_smile: