Categories

Change WordPress Logo on Admin Login Page

By default, WordPress has their own logo and URL in admin signup or login page. There is not an option to change the logo from the WordPress admin panel.

Sometimes it is required to change the default logo to custom login logo and URL to match the branding.

This article will show you how to change the default login logo with simple codes & plugins.

Change WordPress Logo on Admin Login Page

In this image shows the default WordPress logo on click which goes to ” https://wordpress.org/ ”

With custom PHP Function

Copy the following PHP function & place it in the functions.php file of active theme.

1
2
3
4
5
6
7
8
9
10
11
function custom_login_logo() {
echo '
<style type="text/css">
h1 a { 
background-image: url('.get_bloginfo('template_directory').'/images/logo.png) !important; 
background-size: auto auto !important; 
width:123px !important; 
height:33px !important;
margin-bottom:0 !important;
}
</style>

‘; } add_action(‘login_head’, ‘custom_login_logo’); // changing the logo link from wordpress.org to your site function mb_login_url() { return home_url(); } add_filter( ‘login_headerurl’, ‘mb_login_url’ ); // changing the alt text on the logo to show your site name function mb_login_title() { return get_option( ‘blogname’ ); } add_filter( ‘login_headertitle’, ‘mb_login_title’ );

In the above code

change the ” background-image: url(‘.get_bloginfo(‘template_directory’).’/images/logo.png) !important; ” to your image name. where ” .get_bloginfo(‘template_directory’). ” represent the active theme folder, ” return home_url(); ” represent the link of home page and ” return get_option( ‘blogname’ ) ” represent the site/blog name.

Change WordPress Logo on Admin Login Page

Without coding

If you don’t have the coding knowledge you can also change the default logo with the help of any plugin easily. There are multiple WordPress plugins available for this purpose. Just install the plugin and follow the instruction.

you can find the useful plugin from WordPress plugin site https://wordpress.org/plugins/search/login+page+logo+change/

hope this article is helpful for you. If you like this article please share this in social media and If you have any query or suggestion, please comment below.

If you would like to write guest posts for Blog Identity, you can contact us onĀ info@blogidentity.com and check our submission guidelines.

You may also like...

Leave a Reply

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