noscript-img

WordPress Eigenes Login-Logo mit Hintergrundfarbe

function namespace_login_style() {
    if( function_exists('get_custom_header') ){
        $width = get_custom_header()->width;
        $height = get_custom_header()->height;
    } else {
        $width = HEADER_IMAGE_WIDTH;
        $height = HEADER_IMAGE_HEIGHT;
    }
    echo '<style>'.PHP_EOL;
    echo '.login h1 a {'.PHP_EOL; 
    echo '  background-image: url( '; header_image(); echo ' ) !important; '.PHP_EOL;
    echo '  width: '.$width.'px !important;'.PHP_EOL;
    echo '  height: '.$height.'px !important;'.PHP_EOL;
    echo '  background-size: '.$width.'px '.$height.'px !important;'.PHP_EOL;
    echo '}'.PHP_EOL;
    echo '</style>'.PHP_EOL;
}

….eine weitere Möglichkeit:

add_action( 'login_head', 'namespace_login_style' );
function namespace_login_style() {
    echo '<style>.login h1 a { background-image: url( ';
    echo 'https://www.vapesation.de/images/logo.png';
    echo ' ) !important; }
	
 	
	body.login {
		background-color: #0073bf;
		} 
	.login #backtoblog a, .login #nav a {color: #fff !important}
	
	
	</style>';
}
add_filter( 'login_headerurl', 'namespace_login_headerurl' );
function namespace_login_headerurl( $url ) {
    $url = home_url( '/' );
    return $url;
}