Created
February 6, 2017 20:38
-
-
Save coffeepostal/468a7782524083029d3030515a234245 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
| // Change Login Logo | |
| function my_login_logo() { ?> | |
| <style type="text/css"> | |
| #login h1 a, .login h1 a { | |
| background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/assets/images/site-login-logo.svg); | |
| padding-bottom: 2rem; | |
| background-size: 10rem 5rem; | |
| background-position: center top; | |
| background-repeat: no-repeat; | |
| color: #999; | |
| height: 5rem; | |
| font-size: 20px; | |
| font-weight: normal; | |
| line-height: 1.3em; | |
| margin: 0 auto 25px; | |
| padding: 0; | |
| text-decoration: none; | |
| width: 10rem; | |
| text-indent: -9999px; | |
| outline: none; | |
| overflow: hidden; | |
| display: block; | |
| } | |
| </style> | |
| <?php } | |
| add_action( 'login_enqueue_scripts', 'my_login_logo' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment