WordPress.org

Ready to get started?Download WordPress

Forums

Modify wp_loginout? (2 posts)

  1. kahitano
    Member
    Posted 5 years ago #

    I am using a layout that uses images for links. I still want to put in the login/logout link, but use images instead. can I modify the code or something to assign an image to the login link and a different image for the logout link?

  2. scribblerguy
    Member
    Posted 5 years ago #

    Use the conditional tag is_user_logged_in() (it's found in wp-includes/pluggable.php) to check if a user is logged in or not. E.g.,

    if (is_user_logged_in()) {
     // Logout Link
    } else {
     // Log-in Link
    }

    Just promise that these image links have alt attributes for those who use screenreaders and such, okay?

Topic Closed

This topic has been closed to new replies.

About this Topic