Skip to content

Instantly share code, notes, and snippets.

@brunomonteiro3
Created July 29, 2015 21:22
Show Gist options
  • Save brunomonteiro3/71f0cd7ba89d384bef81 to your computer and use it in GitHub Desktop.
Save brunomonteiro3/71f0cd7ba89d384bef81 to your computer and use it in GitHub Desktop.
Custom logo and URL on Wordpress admin.
<?php
function my_login_logo() { ?>
<style type="text/css">
.login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/path/to/logo.png);
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
function my_login_logo_url() {
return home_url();
}
add_filter( 'login_headerurl', 'my_login_logo_url' );
function my_login_logo_url_title() {
return 'Your Project Name';
}
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