...

How To Change WordPress Admin Logo?

How To Change WordPress Login Page Logo Without Using Any Plugin

What is the WordPress Login Page?

The WordPress login page is the door between the front end (your website) and the back-end (management dashboard) of your site. It is also known as the admin area. Once you logged in to the admin area as administrators then you are able to change the website design such as add or delete themes, plugins and customization. You are also able to add new users or delete old users and add, delete and publish posts or pages.

How do I Find The WordPress Login Page URL?

Beginners often have a hard time finding the WordPress login page URL. Usually the WordPress default login page URL is http:// or https://yoursite.com/wp-login.php? Or http:// or https://yoursite.com/wp-admin . If WordPress is installed in a subfolder then the WordPress login URL will be http:// or https://yoursite.com/subfolder/wp-login.php? And http:// or https://yoursite.com/subfolder/wp-login.php?

Sometimes the WordPress login page URL may be changed by the designer or administrator of the site. The example login URL  http:// or https://yoursite.com/customslug

What Logo Shown By Default On WordPress Login Page?

By default WordPress provides own logo on Admin Login Page, Registration Page and Lost Password Page. But for better branding of your website you may like to change that default logo from the WordPress Login Page Logo to your website logo.

Can I Change That Default WordPress Logo From WordPress Login Page?

Yes of course you can change that default WordPress logo. There are different ways to change it. You can easily change the logo by using a plugin.

How to Change the Default WordPress Logo without a Plugin?

It is most important to use a child theme. So that you never lose the custom codes after updating the theme. Nowadays there are frequent updates of WordPress and the theme.

To do this we need to override the default style or WordPress Login. This code is tested in WordPress 5.8.1 version with Divi child theme. Add the following codes to the functions.php in your child theme.

//* Add logo to admin login page
function tips_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(https://healthylivingprotips.com/wp-content/uploads/2021/09/Logo-1.png); background-size: 200px; width: 100%;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'tips_login_logo' );

Please change the logo image url with your website logo url.

Now It’s Time To Change the Custom Logo URL.

After logo change to your website custom logo, you need to change the logo URL to your desired website URL instead of the default WordPress site URL. For that you need to add codes to your child theme functions.php file. Here it is:

//* Change WordPress Admin Login Logo Link URL
if ( !function_exists(‘tips_wp_admin_login_logo_url’) ) :

function tips_wp_admin_login_logo_url() {
return home_url();
}
add_filter( ‘login_headerurl’, ‘tips_wp_admin_login_logo_url’ );

endif;

Now the custom logo URL changed to your website home page URL. Because the codes used the home_url(); function which gets the URL from the current site front end.

Change Admin Login Page Logo Title:

Usually the admin login page logo by default has the text “Powered by WordPress”. So we can change that to your custom website title with that default title. To do this please add the below codes to your child theme functions.php file.

//* Change WordPress Admin Login Logo’s Title
if ( !function_exists(‘tips_wp_admin_login_logo_title’) ) :

function tips_wp_admin_login_logo_title( $headertext ) {
$headertext = esc_html__( get_bloginfo(‘name’), ‘plugin-textdomain’ );
return $headertext;
}
add_filter( ‘login_headertext’, ‘tips_wp_admin_login_logo_title’ );

endif;

This code will replace the title used for your website with the default title.

Now you have learned that how to change those above things. You can use FTP/Cpanel File Manager or from WordPress Dashboard to Appearance > Theme Editor > Select theme to edit: (Child Theme) > functions.php and the codes just after <?php this and save it.

Just copy the below three functions and paste them to your child theme functions.php as stated above.

//* Add logo to admin login page
function tips_login_logo() { ?>
<style type=”text/css”>
#login h1 a, .login h1 a {
background-image: url(https://healthylivingprotips.com/wp-content/uploads/2021/09/Logo-1.png); background-size: 200px; width: 100%;
}
</style>
<?php }
add_action( ‘login_enqueue_scripts’, ‘tips_login_logo’ );

//* Change WordPress Admin Login Logo Link URL
if ( !function_exists(‘tips_wp_admin_login_logo_url’) ) :

function tips_wp_admin_login_logo_url() {
return home_url();
}
add_filter( ‘login_headerurl’, ‘tips_wp_admin_login_logo_url’ );

endif;

//* Change WordPress Admin Login Logo’s Title
if ( !function_exists(‘tips_wp_admin_login_logo_title’) ) :

function tips_wp_admin_login_logo_title( $headertext ) {
$headertext = esc_html__( get_bloginfo(‘name’), ‘plugin-textdomain’ );
return $headertext;
}
add_filter( ‘login_headertext’, ‘tips_wp_admin_login_logo_title’ );

endif;

Related Posts

How to create clickable phone and sms link?

How to create clickable phone and sms link?

How to create clickable phone and sms link? Nowadays no one can pass a single day without a smartphone. Laptop/Computer Tabs are much more essential for web browsing in modern day. So a web designer or web developer should care about creating clickable phone links and...

read more
Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.