wordpress custom login successful redirect hook

I am using a custom login form imported on my theme’s home page through jqModal. In that, when i successfully login it redirects to the same page. I want to redirect based on the logged in user role.

I will prefer a response with some editing in my functions.php or adding a mini plugin. Because I dont want wordpress original files to be edited for future updating hassles.

Solutions Collecting From Web of "wordpress custom login successful redirect hook"

wp_login_form() has the “redirect” parameter.

Define it on the basis of user role.


I used Theme My Login Plugin and modified its templates as per my requirements. I think its the best plugin as per my requirements were concerned. You may check yours.

Also if you want to see the working inside the code, this plugin coding approach is nice and adaptive.