Return to Snippet

Revision: 68900
at March 14, 2015 04:50 by pauloc


Initial Code
// Change login logo
function custom_login_logo() {
  echo '<style type="text/css">h1 a { background: url('.get_bloginfo('template_directory').'http://cdn.css-tricks.com/images/logo-login.gif) 50% 50% no-repeat !important; }</style>';
}
add_action('login_head', 'custom_login_logo');

//  Change logo URL
function change_wp_login_url() {
  return bloginfo('url');
}
add_filter('login_headerurl', 'change_wp_login_url');

// Change login title
function change_wp_login_title() {
  return get_option('blogname');
}
add_filter('login_headertitle', 'change_wp_login_title');

Initial URL
https://css-tricks.com/snippets/wordpress/customize-login-page/

Initial Description
Source: https://css-tricks.com/snippets/wordpress/customize-login-page/
Put them in your theme functions.php or make it a plugin.

Initial Title
WordPress login screen

Initial Tags
login, wordpress

Initial Language
PHP