Last active
October 21, 2020 15:12
-
-
Save morgyface/040dbac37e4c2edc53eeddf879242ee1 to your computer and use it in GitHub Desktop.
WordPress | Login customisation
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 | |
// Add the login styles | |
function add_login_scripts() { | |
/** | |
* login_enqueue_scripts is the proper hook to use when enqueuing items that | |
* are meant to appear on the login page. | |
*/ | |
wp_enqueue_style( 'core', get_stylesheet_directory_uri() . '/assets/css/login.min.css', array('login') ); | |
} | |
add_action( 'login_enqueue_scripts', 'add_login_scripts' ); | |
// If we are changing the login logo, it makes sense to also change the URL | |
function add_login_logo_url() { | |
return home_url(); | |
} | |
add_filter( 'login_headerurl', 'add_login_logo_url' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's some supporting CSS