Replace login logo

Adding this PHP code to the functions.php of your wordpress theme will allow you to replace the default wordpress login logo.

function loginLogo() {
    echo '<style type="text/css">
        h1 a { background-image:url('.get_bloginfo('template_directory').'/images/logo.gif) !important; }

add_action('login_head', 'loginLogo');

Comments  Leave a Reply

  1. How can I make this work with a child theme instead of the template_directory?

  2. Noahj Champion July 3, 2014 at 9:36 am

    Still working of course and thanks!

  3. Works like a charm, thanks!

    1. Good to hear, enjoy!

  4. Paul te Kortschot March 31, 2011 at 12:24 pm

    Heij Kevin,

    When you add this:

    // verander de url op de login pagina
    function put_my_url(){
    return (‘http://www.tekortschot.nl/’); // url
    add_filter(‘login_headerurl’, ‘put_my_url’);

    to function.php it will replace the destination of the image link to.

    Maybe you can help… do you haven any idea how to add in this snippet that the link title is custom to? So replace “Powered by WordPress”.


    1. Hi Paul,
      Ill take a look into this and get back to you with my findings,

    2. Sent you an email with the code snippet,

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!