Change logo on wordpress login page

wordpress-login-page-logo

wordpress is the most know and easy CMS for blogging. If you are a regular user of wordpress then there is a question must came in your mind that how you can change wordpress logo on login page. There are several Plugins available to change wordpress logo on login page but i think we don’t need to add a plugin for this type of small modification. So here is a simple solution. If you know little bit about php cand and you know something about wordpress templates then you can add this code very easily. Just follow these instructions:

  1. Upload image in the theme folder which you want to replace with default wordpress logo.
  2. Paste the code mentioned below in “functions.php” file of theme’s folder.
<?php 
// user defined login logo
    function new_login_logo() 
    {   $logoinfo='<style type="text/css">
    h1 a { background-image: url('.get_bloginfo('template_directory').'/images/yourlogo.gif) !important; 
   }  </style>';
echo $logoinfo;
    }   add_action('login_head', 'new_login_logo');
 ?>

You had to rename “yourlogo.gif” to the name of the logo you just uploaded in theme’s images folder.

That is all hope you got it. Enjoy! Feel free to ask any questions.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.