Customize WordPress Log-In Screen Without Edit Admin Files

Creation & Innovation

Moderator: Moderators

Customize WordPress Log-In Screen Without Edit Admin Files

Postby finoy » Thu Jun 21, 2012 11:19 pm

Hi All,
There are several ways to do this, mostly we use plug-ins or edit directly wp admin files. First, let’s look at a way to customize the log-in logo through our own theme. Customizing the logo’s URL is easy. Just add this code to your functions.php file:

Code: Select all
<?php

add_action("login_head", "custom_login_logo");

function custom_login_logo() {
   echo "
   <style>
   body.login #login h1 a {
      background: url('".get_bloginfo('template_url')."/images/custom-logo.png') no-repeat center top;
      height: 500px;
      width: 600px;
   }
   </style>;
   ";
}

?>


For editing Login Logo URL to Site URL, add this code to your functions.php file:

Code: Select all
<?php
function the_url( $url ) {
    return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'the_url' );
?>


Regards,
Finoy Francis
finoy
 
Posts: 14
Joined: Thu Jun 21, 2012 10:34 pm
Tell us why you would like to become a WyseLabs Member: am the part of this website. :)

Return to Web Design

Who is online

Users browsing this forum: No registered users and 4 guests

cron