Created
September 23, 2017 23:49
-
-
Save shrinkray/1bae65d96fcb30a974bf149b0516357e to your computer and use it in GitHub Desktop.
Added to functions.php to replace WordPress Logo with other branding for sites.
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 | |
| /** | |
| * Customized Login Actions | |
| * | |
| */ | |
| function loginlogo() { // TODO use brand colors if possible | |
| echo "<style type=\"text/css\"> | |
| .login h1 a { | |
| background-image: url('" . get_template_directory_uri() . "/dist/images/logo-avatar.png') !important; | |
| width:150px;height:150px;background-size:150px 150px;background-position: center center; | |
| } | |
| .login #nav { | |
| text-align: center; | |
| } | |
| #backtoblog { | |
| text-align: center; | |
| color: #008EC2 !important; | |
| } | |
| #backtoblog a { | |
| color: #008EC2 !important; | |
| font-weight: 700; | |
| font-size: 1rem; | |
| } | |
| </style>"; | |
| } | |
| add_action('login_head', 'loginlogo'); | |
| function greg_loginURL() { | |
| return 'https://gregmiller.io'; | |
| } | |
| add_filter('login_headerurl', 'greg_loginURL'); | |
| function greg_loginURLtext() { | |
| return 'Greg™ | Mobile-first Branding, Development, Maintenance, & Hosting'; | |
| } | |
| add_filter('login_headertitle', 'greg_loginURLtext'); | |
| function greg_loginfooter() { ?> | |
| <p style="text-align: center; margin-top: 1em; color: #b4b4b4;"> | |
| If you would like a cool site like this, <a style="color: rgba(238,64,11,0.52); text-decoration: none;" href="https://gregmiller.io/contact/">ask for Greg</a>. | |
| </p> | |
| <?php } | |
| add_action('login_footer','greg_loginfooter'); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment