Posts

Showing posts from November, 2017

Add custom logo in wordpress login page

Put below code to your active themes functions.php

function wpAdminLoginLogo(){
    $custom_logo_id = get_theme_mod( 'custom_logo' );
    $logo_image = wp_get_attachment_image_src( $custom_logo_id , 'full' );
?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(<?php echo $logo_image[0];?>);
padding-bottom: 30px;
height: auto !important;
background-size:210px;
width: 100%;
}
</style>
<?php
}
add_action( 'login_enqueue_scripts', 'wpAdminLoginLogo' );