Al Mamun Hossen Blog

Graphic Designer | Web Developer | Opentype font Developer I am at any time very happy because my country's name is Bangladesh. I am an Emotional, Optimist, Challenging, Simple man, I always try my best to keep the good character, I love my Parents, My Motherland Bangladesh. I'm Working at Reem Group as Computer IT Solution & Ekushey as an Artwork Graphics Designer Opentype font Developer

Recent

Post Top Ad

Your Ad Spot

Friday, June 24, 2022

How to Changing WordPress Login Logo and URL without Plugin

This method allows you to manually replace the WordPress logo on the login screen with your own custom logo.

First, you need to upload your custom logo to the media library. Simply go to Media -> Add New -> Drop File to upload your custom logo.



Once you have uploaded the image, click the logo (IMG) & where you need to copy the file URL and paste it somewhere convenient, such as a blank text file on your computer.



Next, you need to add the following code snippet to your theme’s functions.php file


/*----login logo Ching ------*/
function wpb_login_logo() { ?>
    <style type="text/css">
       #login h1 a, .login h1 a {
       background-image: url(https://alreemprintingpress.com/wp-content/uploads/2020/03/Reem-Logo_Logo.svg); //--Change url--//
       height:100px;
       width:300px;
       background-size: 300px 100px;
       background-repeat: no-repeat;
       }
.login form {
    border: none;
    border-radius: 12px;
    color: #005AA9;
}

/*----- Chinge Button Full Width----- */

.wp-core-ui .button.button-large {
    width: 100%;
    background-color: red;
    border: none;
    margin-top: 10px;
}

    </style>
<?php }
add_action( 'login_enqueue_scripts', 'wpb_login_logo' );

/*-----Replace Logo Home page URL link -----*/

function login_page_URL( $url ) {
 $url = home_url( '/' );
 return $url;
}
add_filter( 'login_headerurl', 'login_page_URL' );

No comments:

Post a Comment

Post Top Ad

Your Ad Spot