Change only internal links color

Hi @mira404,

You need to add two classes in CSS code in Appearance -> Customize -> Additional CSS section

.internal_link{color: #000;text-decoration: underline;}
.external_link{ color: #ef3737;font-weight: 700;text-decoration: underline;}

Once you will add it then everywhere you need to use these classes as per your requirements, for an external link you need to use the ‘external_link’ class and for an internal link you need to use the “internal_link” class.

Hope this will work for you.

Regards,

I’m using the GeneratePress theme, code isn’t working check this: https://prnt.sc/uix2do

@mira404@ravivaddweb code works just fine but your have to add classes to all your links for it to work.

You can also use:

a { color: green; }
a[href*="//"]:not([href*="your_site.com"]) {
	color: pink;
}

Of course, change the your_site.com to whatever your site is.

@tugbucket

a { color: #111111; }
a[href*="//"]:not([href*="*****.com"]) {
	color: #fc7d46;
}

Now code working fine. Also want to add underline interlink only like this: https://prnt.sc/uivvbz

  • This reply was modified 2 days ago by mira404.

a { color: #111111; text-decoration: underline; }
a[href*="//"]:not([href*="*****.com"]) {
	color: #fc7d46; text-decoration: none;
}



Source link