WordPress: Custom Backend Logo
To add a custom login logo to the back end of your site you can use the following code. Place in your themes functions.php file within the theme and insert this code inside your PHP code <?php and ?>.
Be sure you scale the logo to have a width of 326px and a height of 100px.
The following code assumes your logo is within your theme under the ‘images’ folder with the name ‘custom-login-logo.gif’.
1 2 3 4 5 6 7 8 |
/*Custom Login Logo*/ function my_custom_login_logo() { echo '<style type="text/css">'; echo ' h1 a { background-image:url('.get_bloginfo('template_directory').'/images/custom-login-logo.gif) !important; }'; echo '</style>'; } add_action('login_head', 'my_custom_login_logo'); |
Recent Comments