
Whilst supporting WordPress is key, you or your clients might not want the WordPress logo on the admin and login pages.
So Today I will show you how to add your own logos to replace the default WordPress logos, the following changes take part in your functions.php file, so ensure you backup before you continue, and be aware of leaving whitespace!

Open functions.php and add the following:
function login_logo() {
echo '<style type="text/css">
h1 a {background:url("'.get_bloginfo('template_directory').'/img/loginlogo.gif") !important; }
</style>';}
add_action('login_head', 'login_logo');
You should then upload your new login logo to the path you have specified in the code snippet above, I find the best image size to use is width: 326px x height: 76px, also a transparent .GIF image works well.

Open functions.php and add the following:
function admin_logo() {
echo '<style type="text/css">
#header-logo {background:url("'.get_bloginfo('template_directory').'/imagefolder/adminlogo.png") !important; }
</style>';}
add_action('admin_head', 'admin_logo');
You should then upload your new admin logo to the path you have specified in the code snippet above, I find a 32px x 32px transparent .PNG logo works well here.
In the examples I have uploaded the image files to the image folder in the template I’m using with my WordPress install, the ‘.get_bloginfo(‘template_directory’).’ line states this for you, you only need to alter the folder name and image file name that follows.
You can of course opt to have no logo displayed on the login page or the admin section, to do this use these snippets:
Open functions.php and add the following:
function login_logo() {
echo '<style type="text/css">
h1 a {display:none;}
</style>';}
add_action('login_head', 'login_logo');
Open functions.php and add the following:
function admin_logo() {
echo '<style type="text/css">
#header-logo {display:none;}
</style>';}
add_action('admin_head', 'admin_logo');
This is an easy way to personalize your WordPress install and will ensure the logos remain in place. When you alter the logo images manually they sometimes are removed during an upgrade.
nice tut,
but why don’t just upload a new login-logo.gif (310 x 70) to /wp-admin/images/ ?
thats all
you can do that, but when WP upgrades it means re-uploading each time, plus the snippets above let you remove all logos too enabling you to “white-label” the install
Thanks for the tips without using any plugin.
can we change the white background of the login page. mine text in white color and i dont need any bg for my text and logo.
kindly tell me how to change the background color of the login page.
” Off topic ”
Can you write a tutorial on adding links in the wp-login page.
eg: twitter,facebook, stumble.
You can manually change the color in you stylesheet found in wp-admin/css. For a function I would have to look into it for you
ITs not working ”
Warning: Cannot modify header information – headers already ”
???
even at first it show the
” function login_logo() { echo ”;} add_action(‘login_head’, ‘login_logo’); ” text above the page
I would assume there is either whitespace in your functions file or an issue with the theme. I wouldn’t really know without seeing it, sorry
Awesome! I was looking for this for weeks!
Trackbacks