Skip to content

Instantly share code, notes, and snippets.

@briankompanee
Last active August 2, 2016 06:15
Show Gist options
  • Save briankompanee/7e4e419dd66b4ee3b8efd35c015580e7 to your computer and use it in GitHub Desktop.
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.
<?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