PHP Programmer and WordPress Ninja

How to customize WordPress login page

A beautiful and nicely crafted theme can change the look and feel of your WordPress site. But, what about the login page? Default login page is too ordinary to attract your visitors. Although this can be handled with a custom login page, but most of the themes does not include this feature.
Here I’m going to show you, how can you customize your login page.

1. Disable Shaking effect
Login page shakes if anything wrong happens. For example if the login details provided are wrong or any of the fields is submitted empty. You can override it’s default events. If you want to disable this shaking effect, add this code into functions.php file of your theme.

Disable Shaking effect

PHP

1

2

3

4

functionna_shake_error_codes($shake_error_codes){

returnarray();

}

add_filter('shake_error_codes','na_shake_error_codes');

2. Change login header URL
By default, login header image is hyperlinked to http://wordpress.org. If you want to change it to your own, use this code-

Change login header URL

PHP

1

2

3

4

functionna_login_header_url($login_header_url){

return'http://nazmulahsan.me';// your custom URL here

}

add_filter('login_headerurl','na_login_header_url');

3. Change login header image title
By default, it says Powered by WordPress. Use this code to change it to a custom text-