Last active
March 2, 2016 11:19
-
-
Save hsleonis/8c8b41f0a4f613b4ca82 to your computer and use it in GitHub Desktop.
Change WordPress admin login logo, mouseover title and logo url.
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 | |
| // add this to your themes functions.php file | |
| // change login image | |
| add_action("login_head", "tmx_login_head"); | |
| function tmx_login_head() { | |
| echo " | |
| <style> | |
| body.login #login h1 a { | |
| background: url('".get_header_image()."') no-repeat scroll center top transparent; | |
| height: ".get_custom_header()->height."px; | |
| width: ".get_custom_header()->width."px; | |
| } | |
| </style> | |
| "; | |
| } | |
| // Change title for login screen | |
| add_filter('login_headertitle', create_function(false,"return get_bloginfo('title');")); | |
| // change url for login screen | |
| add_filter('login_headerurl', create_function(false,"return home_url();")); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'll need to add theme-support for 'header image' as well in your "after_setup_theme" action hook: