[wp-trac] [WordPress Trac] #65393: custom login page
WordPress Trac
noreply at wordpress.org
Tue Jun 2 17:59:22 UTC 2026
#65393: custom login page
-----------------------------+-----------------------------
Reporter: avagp | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 7.0
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
i firmly believe in the customize principle of wordpress.
So in every wordpress installation i add this simple PHP code:
if (!class_exists('CustomLoginLogo')) {
class CustomLoginLogo {
public function setCustomLogo() {
$custom_logo_id = get_theme_mod('custom_logo');
$logo_url = wp_get_attachment_image_url($custom_logo_id,
'full');
if ($logo_url) {
echo <<<EOD
<style type="text/css">
body.login {
height: auto !important;
background: #c1c1c1;
}
body.login div#login h1 a {
background-image: url({$logo_url}) !important;
background-size: contain !important;
width: 100% !important;
}
</style>
EOD;
}
}
}
}
$customLoginLogo = new CustomLoginLogo();
add_action('login_head', array($customLoginLogo, 'setCustomLogo'));
This code does 2 things, changes the background color of the login page
and replaces the wordpress logo with the site's logo.
With this simple customization, the site feels more yours.
So i am suggesting that this should be in the general settings, pick a
color or image as background and change the logo of the login page.
That's my little opinion
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65393>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list