Skip to content

erick t. hitter

web tinkerer

  • Home
    • Adventures with VPS
      • Backups
      • mailserver
      • nginx
      • SSL
    • Tech & Tools
    • WordPress
  • Photos
  • Musings, ramblings, etc.
  • Code
    • GitHub
    • Automating plugin releases to WordPress.org using GitLab CI
    • Generating a CSR with SAN at the command line
    • Monitoring and culling stale GitLab Runner instances
  • Presentations
    • Presentations @ Slideshare
  • Plugins
    • Automating releases using GitLab CI
    • Redis User Session Storage
  • About
    • Public Keys
      SSH, PGP, etc
    • apt repos
    • Timeline
      Where I’ve been and when
    • Contact
    • License
    • Donate
    • Privacy Policy
  • Twitter
  • GitLab
  • GitHub
  • WordPress.org

Latest Posts

  • Plugin updates and translation lessons
  • Connecting an iHome SmartPlug to Home Assistant
  • Compiling nginx with GitLab CI

Categories

Category: Tech & Tools

Replacing WordPress Logo on wp-login.php

There are many times when, as much as I’d love to publicize that a site is built on WordPress, the logo just isn’t appropriate on the login screen (wp-login.php). Thankfully, it’s quite easy to replace the logo using a bit of CSS. Simply paste the following snippet of code into your theme’s functions.php file and adjust the CSS on line 4 as needed.

//Theme login screen
function replace_login_logo() {
 $style = '<style type="text/css">';
 $style .= '#login h1 { background: url( ' .  get_stylesheet_directory_uri() . '/images/logo.gif ) no-repeat scroll center top transparent; display: block; height: 118px; overflow: hidden; padding-bottom: 15px; text-indent: -9999px; width: 369px; margin-left: -25px; }';
 $style .= '#login h1 a { display: none; }';
 $style .= '</style>';
 echo $style;
}
add_action( 'login_head', 'replace_login_logo' );
Posted on November 6, 2010March 15, 2017Categories Code, Tech & Tools, WordPressTags Logo, WordPress, wp-login, wp-login.php

Posts navigation

Previous page Page 1 … Page 7 Page 8
Privacy Policy Proudly powered by WordPress