Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress Custom Login Page LOGO
/*Add the following code to yr themes child functions.php file or into Code Snippets plugin. remember to change the url*/
function login_logo() { ?>
<style type="text/css">
#login h1 a, .login h1 a {
background-image: url(https://mywebsite.com/wp-content/uploads/2021/10/my_image.png); /* this is the FULL path to your image*/
height:175px; /*You will have to test and play to make sure these measurements work with your image size*/
width:175px;
background-size: 175px 175px;
background-repeat: no-repeat;
padding-bottom: 0px;
margin-top: -30px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'login_logo' );
function login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'login_logo_url' );
function login_logo_url_title() {
return 'Put Your Business Name Here....';
}
add_filter( 'login_headertitle', 'login_logo_url_title' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment