large shade tree

Navigation

Information

Recent Posts

Shade Tree Sites |Building Better Websites

Custom Login for WordPress

Here’s an easy way to change the WordPress login logo, title and link and customize your WordPress login screen:

  • create your new logo – size it 310px x 70px
  • upload new logo to images folder of the theme you are using and name it custom-login-logo.jpg (or png, gif etc. whatever you save it as)
    • if you don’t have an images folder in your theme add one or change the address below to point to the location your new logo is located
  • to change logo add the following to your functions.php file:

function my_custom_login_logo() {
    echo ‘<style type=”text/css”>
        h1 a { background-image:url(/wp-content/themes/your theme name here/images/custom-login-logo.jpg) !important; }
    </style>';
}

 

add_action(‘login_head’, ‘my_custom_login_logo’);

  • to change logo link and title add this to the functions.php file ( so your new logo links to your blog instead of WordPress):

function change_wp_login_url() {
echo bloginfo(‘url’);
}

function change_wp_login_title() {
echo get_option(‘blogname’);
}

add_filter(‘login_headerurl’, ‘change_wp_login_url’);
add_filter(‘login_headertitle’, ‘change_wp_login_title’);

That’s all now when you login your new logo will appear and will be linked and titled to your blog / site.