Tutorials › How to change login logo
How to change login logo
Overview
Steps for changing the logo on your WordPress login page.
Steps
I. Upload your logo
- Click Media
- Click Add New
- Click Select Files
- Select your logo or image that you want to use for the login page
- Click the image after it has been uploaded
- Click Copy URL
II. Configure the login page to use your logo
- Open
functions.phpin your child theme folder - Add the following code
function wps_login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(LOGO_URL);
height:300px;
width:300px;
background-size: 100%;
background-repeat: no-repeat;
padding-bottom: 20px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'wps_login_logo' );
- Replace
LOGO_URLwith the URL that you copied earlier - Save the file
- Visit your login page (
example.com/login) - Tweak the
heightandwidthvalues to ensure a good fit