WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] php code to make link disappear after clicking on it? (4 posts)

  1. jenyus
    Member
    Posted 4 years ago #

    Does anyone know of some php code to make a link disappear once its been clicked on? I have a link to launch an mp3 player on the site but everytime you click it a new one launches so it would be great for that link to disappear after its clicked. the link is included in my header.php file.

    thanks!

  2. vtxyzzy
    Member
    Posted 4 years ago #

    Assuming the link is under a class named 'mp3player', you can add this to your style.css:

    .mp3player a:visited { display: none; }

  3. jenyus
    Member
    Posted 4 years ago #

    what a splendid idea! cant believe i didnt think of that!

  4. vtxyzzy
    Member
    Posted 4 years ago #

    Only downside I can think of is that it won't reset until browser history is cleared.

    If this solves your problem, please mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags