Friday, June 17, 2016

How to Change the Login Logo in WordPress

How to Change the Login Logo in WordPress

Hello friends,hope you are doing good. Today again i am here to share my knowledge in context with WordPress.Many of you are eager to know that How to Change the Login Logo in WordPress.Enter your website name in URL bar with /wp-admin ex- www.example.com/wp-admin.After that,you can see the login page with default WordPress logo. Many of you want to use your desired logo instead of default logo,so i am here with the snippets.Through this snippet you can easily replace default WordPress logo with the desired logo.
So Copy below mentioned code and paste in your functions.php.

Change WordPress login Logo Code

This is the code snippet to change the logo on the wordpress login screen.
All you have to do just copy this code and paste in your functions.php file and change the wordpress logo with your custom logo that you want to use and it's done
function custom_admin_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url(/images/logo.jpg) !important; }
    </style>';
}

add_action('login_head', 'custom_login_logo');

Change Logo Link

To change the link of your logo so the logo links to your WordPress site, copy the following WordPress hook and paste it in the functions.php:
function my_login_logo_url() {
    return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
    return 'Your Site Name and Info';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );
The above snippets will change the link of your blog url and will change the title of the link to whatever you want That's all you have to do for More reference you can visit on this link Customizing_the_Login_Form

0 comments:

Post a Comment