Customize the WordPress Login Screen Logo without a Plugin

July 7, 2010 by Efraín | 7 Comments

Yesterday I posted a tip on how to customize the WordPress dashboard logo. Whether you’re building a WordPress powered website for a client or yourself, you might also want to customize the login screen logo.

Just paste the code below to your functions.php theme file:

function my_custom_login_logo() {
    echo '


';
}

add_action('login_head', 'my_custom_login_logo');

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');

This code will also replace the title and link attributes to match your new logo.

All that is left to do is to create a 310px wide by 70px tall image and upload it to your theme’s images folder and you’re done.

Credits: wp-tricks

7 Responses

  1. [...] Go here to see the original: Customize The WordPress Login Screen Logo Without a Plugin | WPFuss [...]

  2. Darren says:

    This has come in really handy. It something I plan to use for a few projects I’m doing soon too. Thanks for posting it

  3. Phyllis says:

    I’m working on a site – DIY – for someone. I read that I should never edit those files because when I update the BP plugin all that code goes away. But I want to change that login page as I have put in the Privacy plugin you recommended and would prefer the WP logo to go away. What to do?

  4. Darren says:

    Hey Phyllis,

    Make a child theme of bp-default and then add the code to its functions.php

    I’ll keep an eye out here so see how you got on :D

  5. [...] Customize The WordPress Login Screen Logo Without a Plugin [...]

  6. Ben says:

    Thanks. This worked like a charm.

Leave a Reply