We get asked this a lot: how to add your company’s logo to the backend login page for WordPress. It makes the whole thing look more prefessional, and in turn, makes the whole thing a lot more appealing to a lot of our clients who have more than one admin or shop manager. The procedure is quite simple, just a few lines of code, the logo in the proper size and you’re done.
The logo is the first thing you’ll need, and it will need to be uploaded to your website. For logos and some general assets for our client’s sites, we tend to add them to the assets folder within the theme itself. This solves a potential future issue where a logo needs to be updated, so it’s easily found and replaced, without the hassle of going through thousands of files in the YY/MM folder. In turn, whenever you wish to change it, simply upload the new version. That’s it!
/* Add Unplugged performance logo to Login page */
function nucleus_login_logo()
{ ?>
<style type="text/css">
#login h1 a,
.login h1 a {
background-image: url('/wp-content/themes/unpluggedperformance/assets/up-black-logo-1.png');
height: 65px;
width: 305px;
background-size: 305px 65px;
background-repeat: no-repeat;
padding-bottom: 30px;
}
</style>
<?php }
add_action('login_enqueue_scripts', 'nucleus_login_logo');
Please use the code, advice, and information presented on this website with caution. Nucleus J.D.O.O, or any of its employees, cannot be held responsible for any damages that this code might cause. We always try to update the code shown on our website, but we cannot guarantee its functionality with various themes, templates, or coding. Please ensure that you test each code thoroughly in order to use it safely.