Created
July 29, 2015 21:22
-
-
Save brunomonteiro3/71f0cd7ba89d384bef81 to your computer and use it in GitHub Desktop.
Custom logo and URL on Wordpress admin.
This file contains 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 | |
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