neilgee
7/13/2017 - 6:55 AM

Custom Logo WordPress Login

Custom Logo WordPress Login

<?php
// When using a child theme
// Hard code logos width and height in the inline style sheet below

add_action('login_head', 'custom_login_logo');
// CUSTOM LOGIN LOGO, LINK AND IMAGE DESCRIPTION
function custom_login_logo() {
    echo '<style type="text/css">
	.login h1 a { background-image:url(' . get_stylesheet_directory_uri() . '/images/logo.png) !important; width: 260px; !important; height: 60px !important; background-size: 100% 100% !important; margin-bottom: 60px !important;}
    </style>';
}
add_filter( 'login_headerurl', 'custom_login_url', 10, 4 );
function custom_login_url() {
	return site_url();
}
add_filter("login_headertitle","login_header_title");
function login_header_title() {
	return get_bloginfo('name');
}