Last active
December 26, 2015 19:19
-
-
Save JiveDig/7200588 to your computer and use it in GitHub Desktop.
Change login logo and link.
logo.png goes in /child_theme/images/ directory
This file contains hidden or 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
/** | |
* Change login logo | |
* Max image width should be 320px | |
* @link http://andrew.hedges.name/experiments/aspect_ratio/ | |
*/ | |
add_action('login_head', 'rgt_custom_dashboard_logo'); | |
function rgt_custom_dashboard_logo() { | |
echo '<style type="text/css"> | |
.login h1 a { | |
background-image:url('.get_stylesheet_directory_uri().'/images/logo.png) !important; | |
background-size: 320px 82px !important; | |
width: 320px !important; | |
height: 82px !important; | |
} | |
</style>'; | |
} | |
// Change login link | |
add_filter('login_headerurl','loginpage_custom_link'); | |
function loginpage_custom_link() { | |
return get_site_url(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment