function my_custom_login_logo_callback() { $style = ".login { background-image: url(/wp-content/uploads/bg-login.png); } #login h1 a, .login h1 a { background-image: url(/wp-content/uploads/profile.png); height: 90px; width: 90px; background-size: 90px 90px; background-repeat: no-repeat; }"; echo $style; } add_action( 'login_enqueue_scripts', 'my_custom_login_logo_callback' ); function my_custom_login_logo_url() { return home_url(); } add_filter( 'login_headerurl', 'my_custom_login_logo_url' ); function my_custom_login_logo_url_title() { return 'John Doe'; } add_filter( 'login_headertitle', 'my_custom_login_logo_url_title' );
How to customize WordPress login page
Login page is one of the most important page of the site and sometimes we forget to add design into it. even if it is so easy to customize.Using “login_enqueue_scripts” hooks and adding some CSS styling will make your login page totally awesome, but it will not end here, we need also to change the URL of our login logo. By default login page logo redirect to wordpress.org site, luckily for us wordpress provides filter to change that hyperlink using “login_headerurl” filter and to change the logo alternate attribute by using “login_headertitle” filter.Copy this code and paste it to you functions.php file and make sure to change the image url with your own images.