Skip to main content
Solved

Override Link Colour

  • November 18, 2020
  • 4 replies
  • 3251 views

Forum|alt.badge.img+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?

Best answer by mike.hoang

Hi Isobel,

 

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

 

Mike

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

mike.hoang
Klaviyo Employee
Forum|alt.badge.img+5
  • Klaviyo Employee
  • 22 replies
  • November 18, 2020

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

 


Forum|alt.badge.img+5
  • Author
  • Contributor II
  • 3 replies
  • November 18, 2020

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

 


mike.hoang
Klaviyo Employee
Forum|alt.badge.img+5
  • Klaviyo Employee
  • 22 replies
  • Answer
  • November 18, 2020

Hi Isobel,

 

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

 

Mike


Forum|alt.badge.img+5
  • Author
  • Contributor II
  • 3 replies
  • November 18, 2020

Perfect - that’s worked. Thank you!