Created
July 9, 2015 08:13
-
-
Save chrisjimallen/ea46a8d0a5c889208f35 to your computer and use it in GitHub Desktop.
Customise WP-Login Logo
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
function my_login_logo_url() { | |
return home_url(); | |
} | |
function my_login_logo_url_title() { | |
return 'Your Title'; | |
} | |
function my_login_logo() { ?> | |
<style type="text/css"> | |
body.login div#login h1 a { | |
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/images/login-logo.png); | |
padding-bottom: 11px; | |
background-size:320px 92px; | |
width: 320px; | |
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,.13); | |
box-shadow: 0 1px 3px rgba(0,0,0,.13); | |
} | |
</style> | |
<?php } | |
add_filter( 'login_headerurl', 'my_login_logo_url' ); | |
add_filter( 'login_headertitle', 'my_login_logo_url_title' ); | |
add_action( 'login_enqueue_scripts', 'my_login_logo' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment