Skip to content

Instantly share code, notes, and snippets.

@Shininglow
Last active April 6, 2023 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shininglow/a07930059ed11821290d6ab900b948d4 to your computer and use it in GitHub Desktop.
Save Shininglow/a07930059ed11821290d6ab900b948d4 to your computer and use it in GitHub Desktop.
// CUSTOM ADMIN LOGIN HEADER LOGO
function my_custom_login_logo()
{
echo '<style type="text/css"'> h1 a { background-image:url(' . get_stylesheet_directory_uri() . '/assets/images/logo_admin.png) !important; } '</style'>';
}
add_action('login_head', 'my_custom_login_logo');
@koraysels
Copy link

koraysels commented Sep 28, 2021

euhhmmm this is very wrongly escaped and probably never tested... the correct escaped verison is this

    echo '<style  type="text/css"> h1 a {  background-image:url(' . get_stylesheet_directory_uri()  . '/logo_admin.png)  !important; } </style>';

@VictorGuerra2
Copy link

Thank you, koraysels it works nicely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment