Last active
June 4, 2018 22:09
-
-
Save stefanotorresi/5089528 to your computer and use it in GitHub Desktop.
add these hooks to your theme's 'functions.php' to customize Wordpress login page
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
function myLoginLogo() { | |
?> | |
<style type="text/css"> | |
.login h1 a { | |
height: 82px; | |
background-size: auto; | |
background-image: url('<?=get_template_directory_uri();?>/img/logo-login.png'); | |
} | |
</style> | |
<?php | |
} | |
add_action('login_enqueue_scripts', 'myLoginLogo'); | |
function myLoginLogoUrl() { | |
return site_url(); | |
} | |
add_filter( 'login_headerurl', 'myLoginLogoUrl' ); | |
function myLoginLogoTitle() { | |
return get_bloginfo(); | |
} | |
add_filter( 'login_headertitle', 'myLoginLogoTitle' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment