Skip to content

Instantly share code, notes, and snippets.

@mustardBees
Created June 4, 2014 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustardBees/f23fea18aebde975d734 to your computer and use it in GitHub Desktop.
Save mustardBees/f23fea18aebde975d734 to your computer and use it in GitHub Desktop.
WordPress login page tweaks
<?php
/**
* Filter the logo on the WordPress login page
*/
function iweb_login_logo(){
echo '<style type="text/css">h1 a {background-image:url(' . get_stylesheet_directory_uri() . '/logo.png' . ') !important; background-position: center center !important; background-size: auto !important; width: 265px !important; height: 80px !important;}</style>';
}
add_filter( 'login_head', 'iweb_login_logo' );
/**
* Filter the url of the logo on the WordPress login page
*/
function iweb_login_logo_url( $url ) {
return home_url( '/' );
}
add_filter( 'login_headerurl', 'iweb_login_logo_url' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment