Created
June 3, 2023 01:28
-
-
Save takien/a2a7bc76805db83d9d6a688b4b289329 to your computer and use it in GitHub Desktop.
WordPress custom login Logo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function custom_loginlogo() { | |
echo '<style type="text/css"> | |
.login h1 a {background-image: url('.wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'large', false )[0] | |
.') !important; | |
pointer-events: none; | |
background-size: contain; | |
height: 100px; | |
font-size: inherit; | |
width: auto; | |
} | |
</style>'; | |
} | |
add_action('login_head', 'custom_loginlogo'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment