Hey guys, In this post, I explain how to change the color of all hyperlinks at once
Go to Dashboard → Settings. Scroll down to the Advanced section → Custom Code, and then click the +Add Custom Code button.
Please note - The site needs to be Premium to add Custom Code.
Paste the following code snippet and select All Pages or choose a specific page.
The body should be at the Body - End.
<script>
colorLinks("#0645AD"); //Change with your favorite color
function colorLinks(hex)
{
var links = document.getElementsByTagName("a");
for(var i=0;i<links.length;i++)
{
links[i].style.color = hex;
}
}
</script>
Why isn’t this a native feature part of wix? It’s a common standard to have links of same style throughout the site and there should be an inbuilt feature to do this.
Wix is constantly working on improving the developer experience. Feel free to make your voice heard. The Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
This was so easy - to be honest I was a bit scared to do it - but it works great!
If only it worked for the side sections as well… Thank you so much @binyaminm
Because it was the only one on this column I just manually changed the color but - just to double-check I went back into the editor and changed it back and now it works just fine!
I’m wondering if it was just a slight delay and I was only being a little impatient?
Since you’re already here though
Can I ask - why is there so much empty space on the blog post preview itself? I tried making it smaller but it won’t let me and I don’t see an option for getting it to include more text in the space available… Any thoughts? Thanks so much for your help and your prompt reply!
@ajanistella Well, the problem is, I have two scripts, one that adds analytics and the other is essential. Unfortunately, I can only add one custom code before the end of the body. But wix does not allow to add two custom snippets before the end of the body. Do you understand me?
The user has the right to refuse all cookies, even the essential ones. So it wouldn’t work anyway! Features like styling a link should simply not be this complicated! I would seriously urge wix product designers to consider giving this a second shot!
@madhu huh they seem to have gotten rid of it since the switch to Velo. Ugh. Consider submitting a support ticket via email and then they might direct you to submit a formal request.
I consider this a hack, this is not an elegant way of doing things. Being a developer one should know! and the product should add this feature properly, I can’t believe they are suggesting everyone to do this hack! Sigh!