RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

Custom Administration Login

If you're preparing a website for a client it's the little touches like these that count. The following code will replace the default wp-admin.php logo with one of your own choosing. If you're a control freak, this is just another means of branding your blog.

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

1
<?php 
2
/*
3
 Custom Administration Login Logo
4
 http://www.beliefmedia.com/code/wp-snippets/login-logo
5
*/
6
 
7
function beliefmedia_login_logo() { ?>
8
<style type="text/css">
9
   body.login div#login h1 a {
10
   background-image: url(http://www.YourWebsite.com/images/custom_admin_logo.jpg);
11
   padding-bottom: 20px;
12
  }
13
 </style>
14
 
15
<?php }
16
add_action( 'login_enqueue_scripts', 'beliefmedia_login_logo' );

The size of your logo should be no bigger than 323 pixels wide by 67 pixels high. Adjust the above padding-bottom value to the spacing you want between your logo and the login form.

The above logo code doesn't remove the logo link to the WordPress website, nor does it remove the alt tag of "Powered by WordPress". The following two functions will take care of that.

The first function will change the logo link.

1
<?php 
2
/*
3
 Custom Administration Login Logo
4
 http://www.beliefmedia.com/code/wp-snippets/login-logo
5
*/
6
 
7
/* Custom Admin Logo Link */
8
9
 echo bloginfo('url'); /* Or another URL */
10
}
11
add_filter('login_headerurl', 'beliefmedia_change_wp_login_url');

The second function will customize the logo title and alt text.

1
<?php 
2
/* Custom WP Login Title */
3
4
 echo get_option('blogname'); /* Your own text */
5
}
6
add_filter('login_headertitle', 'beliefmedia_change_wp_login_title');

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment