Skip to content

Instantly share code, notes, and snippets.

@daigofuji
Last active December 18, 2015 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daigofuji/5750950 to your computer and use it in GitHub Desktop.
Save daigofuji/5750950 to your computer and use it in GitHub Desktop.
Customizing wordpress "login screen." Add this to wp-content/themes/YOUR_THEME_FOLDER/functions.php
// Custom login page. Modifying logo image, link and title.
function my_custom_login_logo() {
echo '<style type="text/css"> h1 a { background-image:url('.get_stylesheet_directory_uri().'/img/MYLOGO.png) !important; }</style>';
}
add_action('login_head', 'my_custom_login_logo');
function namespace_login_headerurl( $url ) {
$url = get_bloginfo( 'url' );
return $url;
}
add_filter( 'login_headerurl', 'namespace_login_headerurl' );
function namespace_login_headertitle( $title ) {
$title = get_bloginfo( 'name' );
return $title;
}
add_filter( 'login_headertitle', 'namespace_login_headertitle' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment