Customizing WordPress Login window

If you installed WordPress in your website’s root directory, your login page is:
http://example.com/wp-login.php

customizing wordpress Login Logo

To change the WordPress logo to your own, you will need to change the CSS styles associated with this heading:

<h1><a href="http://wordpress.org/" title="Powered by WordPress">Your Site Name</a></h1>

WordPress uses CSS to display a background image — the WordPress logo — in the link (<a>) inside the heading tag (<h1>). You can use the login_enqueue_scripts hook to insert CSS into the head of the login page so your logo loads instead. To use the code below, replace the file named site-login-logo.png with the file-name of your logo, and store your logo with your active Theme files in a directory named /image

Add the follwoing code to your functions.php

function tr_login_logo() { ?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
padding-bottom: 30px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'tr_login_logo' );
customizing Logo link and title

But still the logo link goes to wordpress.org ,and powered by wordpress as title

To change this add the following lines to the functions.php, for title change this “Your Site Name and Info” to your tagline

<?php
  /* ------------------------------------------------------------------------ */
  /* TechieResource.com: customizing Login window logo and title link */
  /* ------------------------------------------------------------------------ */
  function tr_login_logo_url() {
  return get_bloginfo( 'url' );
  }
  add_filter( 'login_headerurl', 'tr_login_logo_url' );
function tr_login_logo_url_title() {
  return 'Your Site Name and Info';
  }
  add_filter( 'login_headertitle', 'tr_login_logo_url_title' );
  ?>

About Techie Resource

I am a wordpress expert and Wordpress Consultant with years of Experience in wordpress Technology.

View all posts by Techie Resource →

One comment on “Customizing WordPress Login window”

Leave a Reply

Your email address will not be published. Required fields are marked *