• Mick

    (@haarbollen)


    Hi
    I’m looking for at possibility to add a button to the login page as we use “force login” for a site that isn’t for everyone to use. I have tried to add a button in the head of index and use ‘hidden’ and ‘visible’ but when not logged in, it’s not visible.
    Any suggestions on how I can solve this task?

    Thanks in advance

Viewing 1 replies (of 1 total)
  • Thread Starter Mick

    (@haarbollen)

    For the time being, I have solved it by adding code to wp-login.php. It could be marked as solved, but if there are better and more secure ways to do it, I’d like to hear it (e.g. I couldn’t get rid of an ugly blue outline on button focus :o))

    From line 95:

    <head>
    <meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />
    <div class="request-access"><a href="#">Request Access</a></div>

    And further, from line 202:

    <body class="login no-js <?php echo esc_attr( implode( ' ', $classes ) ); ?>">
        <style>

    .login .request-access {
    position: absolute;
    right: 30px;
    top: 30px;
    z-index: 99999;
    visibility: visible;
    outline: none !important;
    border: none !important;
    }

    .login .request-access a {
    background: #ed1c24;
    color: #fff !important;
    text-decoration: none;
    font-size: 22px;
    font-weight: 300 !important;
    padding: 8px 20px 12px 20px;
    border-radius: 6px;
    outline: none !important;
    }

    .login .request-access a:hover, .login .request-access a:focus {
    background: #dd003b;
    outline: none !important;
    border: none !important;
    }

    .login .request-access a:hover, .login .request-access a:focus {
    background: #dd003b;
    outline: none !important;
    border: none !important;
    }

    </style>

    • This reply was modified 4 months ago by Mick.
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.