Skip to content

Instantly share code, notes, and snippets.

@stefanotorresi
Last active June 4, 2018 22:09
Show Gist options
  • Save stefanotorresi/5089528 to your computer and use it in GitHub Desktop.
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
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