Created
May 25, 2022 14:17
-
-
Save runezero/1eebfca163334a83f6fcd734e0ddd55c to your computer and use it in GitHub Desktop.
[Change wp login page styling] Add a custom styling to the login page #wordpress
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
| function wpdev_login_logo() { ?> | |
| <style type="text/css"> | |
| #login h1 a, .login h1 a { | |
| background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg); | |
| height:85px; | |
| width:150px; | |
| background-size: 150px 85px; | |
| background-repeat: no-repeat; | |
| padding-bottom: 0px; | |
| } | |
| body { | |
| background-color: #ffffff!important; | |
| } | |
| </style> | |
| <?php } | |
| add_action( 'login_enqueue_scripts', 'wpdev_login_logo' ); | |
| add_filter( 'login_headerurl', 'wpdev_loginlogo_url' ); | |
| function wpdev_loginlogo_url($url) { | |
| return get_site_url(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment