Site logo

[Resolved] Visited link colour doesn’t change

Home Forums Support [Resolved] Visited link colour doesn’t change

Home Forums Support Visited link colour doesn’t change

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2590999
    Jennifer

    I have certain blocks where I want to highlight the colour of a visited link.

    For those blocks, I have added an additional class in Advanced called “daily-readings-links”.

    In Additional CSS I have added:

    .daily-readings-links a:visited {
    color: #E31C3D;
    }

    This works as intended if I click on the link on the page that contains the block; the visited link turns red and stays red if I leave and return. However, if I visit the page that the link points to some other way and then go look at the link, it is still the original colour.

    Is there a way to have the link change colour no matter how the page (that the link points to) was visited?

    Edit: There is no option in Appearance > Customize > Colours > Body (or Content) to add a visited link colour, only Initial and Hover.

    #2591132
    Ying
    Staff
    Customer Support

    Hi Jennifer,

    However, if I visit the page that the link points to some other way and then go look at the link,

    Not sure I understand what this means.

    The CSS you are using is the correct way to change the visited link color.
    I’m not aware of other CSS for this.

    #2591445
    Jennifer

    I was under the impression that the URL for a page would register as ‘visited’ no matter how the page was called up. So you have two pages, as a simple example, with the same link for a third page. I follow one link. On both pages the URL would show as ‘visited’. Perhaps I’m crazy and this doesn’t happen? Only one page would show the URL as ‘visited’?

    Edit: other than the blocks where I have specified a colour for visited links (and I have clicked directly from this page), no link on the site shows a different colour if the URL has been visited.

    #2591913
    David
    Staff
    Customer Support

    Hi there,

    the :visited pseudo selector only applies to the link if it has been clicked on. As the browser records the visited action on click.

    And in the theme, we don’t apply a visited color.

    If you want you can do some CSS like this:

    .entry-content p a:visited {
        color: #f00;
    }

    This will apply a visited style to any links within the content of your post.

    #2592283
    Jennifer

    Got it, thanks!

    #2592436
    David
    Staff
    Customer Support

    You’re welcome

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.