Created
August 30, 2019 14:10
-
-
Save ladislavsulc/bbf2235916a89ef776a468a29bc268c2 to your computer and use it in GitHub Desktop.
Change Admin Login Logo (WordPress)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Admin Logo | |
function custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { | |
background-image:url(/wp-content/uploads/**/logo.svg) !important; | |
width: ** !important; | |
background-size: 100% !important; | |
height: ** !important; | |
margin-bottom: 2em !important; | |
} | |
</style>'; | |
} | |
add_action('login_head', 'custom_login_logo'); | |
// Change Logo Link | |
add_filter( 'login_headerurl', 'custom_loginlogo_url' ); | |
function custom_loginlogo_url($url) { | |
return $admin_url; | |
} | |
// Change Logo Title | |
function my_login_logo_url_title() { | |
return 'Website Name'; | |
} | |
add_filter( 'login_headertitle', 'my_login_logo_url_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment