How to customize the theme of your WordPress registration page

After implementing the theme on WordPress the client asked for the default WordPress registration page to be also completed in the same theme. He had a point in that the WordPress registration page will look very out to the visitor considering that the whole website theme was quite elegant.

I Googled it a bit and found that even though some people had worked on customization there was no one permanent solution to the problem and every body had more or less hacked the page according to their needs. This is understandable as there are a lot of different versions of WordPress out there.

After going through some code I found that it’s not that difficult to customize the page.

Open the wp_login.php file. You will find this file at the root. Find the function

function login_header($title = 'Log In', $message = '', $wp_error = '') {

and add all the header code of your template here. This function runs every time the page loads for the Login, Register and Forgot Password page so once you have implemented your theme header the theme will apply to the other pages as well.

If you need to edit any thing in the actual code of your registration (like I had to) then you can go to the function

function register_new_user($user_login, $user_email) {

and make the change there.

The footer is the easiest part. You just need to apply the footer code right at the bottom and voila you are all done.

You can see what I have done by going here.

Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*