Solved

Override Link Colour

  • 18 November 2020
  • 4 replies
  • 2955 views

Badge +5

Hello - 

I have been trying to use the code from the Klaviyo FAQs page to change the colour of my unsubscribe link (and make it different to my setting in Styles), but no luck. 

Here’s the code:

<a href="{% unsubscribe %}" style="color:#AAAAAA !important;">Unsubscribe</a>

Can anyone see any errors here?

icon

Best answer by mike.hoang 18 November 2020, 17:24

View original

4 replies

Userlevel 3
Badge +5

Hi Isobel,

 

Your code looks correct here. You may be running into an issue if you aren’t adding the code to the right place. You’ll want to add the code into the Source of a text block. Once you add the code to the correct place, you’ll be able to see the link change color immediately. 

 

Mike

 

Badge +5

Hi Mike - thanks for your reply. 

I have the code in the Source text box (see screenshot 1). It displays correctly in the email builder, just not when I generate a preview (in Klaviyo or by email).

 

Any advice?

 

1. Source text box
2. This is how it appears in the email builder

​​​​​​3. This is how it appears in preview

 

Userlevel 3
Badge +5

Hi Isobel,

 

It looks like we were adding the wrong URL as it appears broken. Try {% unsubscribe_link %} instead!

 

Mike

Badge +5

Perfect - that’s worked. Thank you!

Reply