PHP
<?php
// E-MAIL ADRESSE ALS USERNAME
function custom_login_label($translated_text, $text, $domain) {
if ("default" == $domain && "Username or Email Address" == $text) {
return "E-Mail Adresse";
}
return $translated_text;
}
add_filter("gettext", "custom_login_label", 20, 3);
// ZEIGT SEITENTITEL ALS LOGO AN
function custom_login_logo_text() {
$site_title = get_bloginfo("name");
echo '<p class="custom-login-logo-text">';
echo $site_title;
echo "</p>";
}
add_action("login_message", "custom_login_logo_text");
// TEXT FEHLERMELDUNGEN ANPASSEN
function gw_custom_login_errors() {
return "Da passt etwas nicht. Versuche es noch einmal oder setze dein Passwort zurück.";
}
add_filter("login_errors", "gw_custom_login_errors");
// deaktiviert die Shake Animation bei falschen Angaben
add_action("login_footer", function () {
remove_action("login_footer", "wp_shake_js", 12);
});CSS
/* CSS Login Head.
Je nachdem wie und wann du das Stylesheet einbindest,
braucht es keine !important Überschreibungen */
p#backtoblog,
#language-switcher,
p.forgetmenot,
#login h1 a,
.login h1 a,
.login .privacy-policy-page-link {
display: none !important;
}
input#wp-submit {
width: 100% !important;
border-radius: 0 !important;
padding: 4px !important;
margin-top: 5px !important;
background: #000;
color: #fff;
border-color: rgba(0, 0, 0, 1);
}
input#wp-submit:hover,
input#wp-submit:focus-visible {
background: rgba(0, 0, 0, 0.7);
}
.login form {
margin-top: 15px !important;
}
.login form .input {
border-radius: 0 !important;
}
p#nav {
text-align: center !important;
margin-top: 15px !important;
}
p#nav a {
text-decoration: underline !important;
}
.login #login_error {
margin: 10px 0 0 0 !important;
}
p.custom-login-logo-text {
font-weight: bold !important;
font-size: 22px !important;
text-align: center !important;
}
.login .message,
.login .notice,
.login .success {
margin-top: 10px !important;
border-left: 4px solid green !important;
}