Site logo

Archived topic

Changing "clicked" link color

15 replies · Started by Alex on November 18, 2020

Viewing posts 1–15 of 16

Hey there!

I'm not seeing an option to change what color links are when you've already clicked them/seen the page - where can I find that?

Thanks for your help!

-Alex

Hi there,

You can change the "Link color visited" through Appearance > Customize > Color > Body.

Note: Header links have its own setting. Check Appearance > Customize > Color to change colors for different parts of your site.

Hmm, all I have is:

-Background Color
-Text Color
-Link Color
-Link Color Hover

AND I have the premium Colors module activated...

Strange, can you provide a screenshot?

Here's what you're supposed to see. https://share.getcloudapp.com/d5uPL5K0

Can you specify which version GP and GP Premium are you using? Thank you.

GeneratePress Version: 3.0.2
GP Premium Version 1.12.2

Can you show us a screenshot or a recording of what you see on your end w/ the customizer's "Colors" setting? Thank you.

Thanks.

There seems to be a small patch that removes it.

Anyway, way can set the visited link color by using the a:visited pseudoclass on CSS.

To clarify: Do you want the visited links set the same throughout the whole site?

If yes, you can apply this custom CSS:

body a:visited{
color: green !important;
}

If you only want this applied to the content, try this CSS:

.site-content a:visited{
color: green !important;
}

Interesting!

By "patch" do you mean a patch in GP/GP Premium?

If so do you know if that will get removed at some point?

A big reason why I went with GP is to avoid adding custom CSS as much as possible :)

By “patch” do you mean a patch in GP/GP Premium?

It's a patch applied on 3.0.2.

It is removed as shown here:
https://github.com/tomusborne/generatepress/commit/b44fbe23b6bdb773a1e11f7c7f1c3395b62d8503
And here:
https://github.com/tomusborne/generatepress/commit/fee754ed9b38940d96ef2f15fa2b3ba629bb77ed

As commented, it's a broken option so it was removed.

If so do you know if that will get removed at some point?

It's quite difficult to determine a specific date for this as Tom is currently focused on GenerateBlocks Pro.

We'll make sure to update everyone through our Changelog page found here: https://generatepress.com/category/development/

Gotcha, thanks for your help Elvin!

No problem. :)

Hey Elvin,

After thinking about/seeing this more I'd like to try to fix the issue by changing/removing the a:visited color in the CSS files.

BUT I can't seem to find where it's set. It doesn't seem to be in the standard files so I'm guessing it might be buried wherever the "Customize" settings insert their code.

Could you take a look and see if you can find it?

-Alex

Defaults are set on wp-content/themes/generatepress/assets/css/main.min.css?ver=3.0.2 or main.css for the text readable version.

But the a:visited selectors doesn't seem to be there. Perhaps removed along with the bugged option.

This is the only one left in it.
a,a:focus,a:hover,a:visited{text-decoration:none}

So there's nothing left to "fix/edit". We don't recommend editing of default theme files anyway.

That said, It's better to do any changes within the Additional CSS.

Turns out I had some old cache files from months ago that weren't getting cleared by the regular purge - got them cleared out now and looks like we're good to go.

Thanks again Elvin!

This archived topic is closed to new replies.