Login Logo

<?php /** * Login Logo * * @package EAStarter * @author Bill Erickson * @since 1.0.0 * @license GPL-2.0+ **/ /** * Login Logo URL * */ function ea_login_header_url( $url ) { return esc_url( home_url() ); } add_filter( 'login_headerurl', 'ea_login_header_url' ); add_filter( 'login_headertext', '__return_empty_string' ); /** * Login Logo * */ function ea_login_logo() { $logo_path = '/assets/images/logo.svg'; if( ! file_exists( get_stylesheet_directory() . $logo_path ) ) return; $logo = get_stylesheet_directory_uri() . $logo_path; ?> <style type="text/css"> .login h1 a { background-image: url(<?php echo $logo;?>); background-size: contain; background-repeat: no-repeat; background-position: center center; display: block; overflow: hidden; text-indent: -9999em; width: 312px; height: 100px; } </style> <?php } add_action( 'login_head', 'ea_login_logo' );
Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk