Last active
August 2, 2016 06:15
-
-
Save briankompanee/7e4e419dd66b4ee3b8efd35c015580e7 to your computer and use it in GitHub Desktop.
WordPress: Customize the standard wp-login Page. Overrides for stylesheet, logo, and links included.
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 | |
/** | |
* Customize the standard WordPress Login page. | |
* Add to functions.php | |
*/ | |
//Link to custom style sheet to override default. | |
function my_login_stylesheet() { | |
wp_enqueue_style( 'custom-login', get_template_directory_uri() . '/dist/styles/main.css' ); | |
} | |
add_action( 'login_enqueue_scripts', 'my_login_stylesheet' ); | |
//Custom logo URL. Links to the home page. | |
function my_login_logo_url() { | |
return home_url(); | |
} | |
add_filter( 'login_headerurl', 'my_login_logo_url' ); | |
//Customize logo title. | |
function my_login_logo_url_title() { | |
return 'My Custom Title'; | |
} | |
add_filter( 'login_headertitle', 'my_login_logo_url_title' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment