Menu bar

Wednesday 31 December 2014

Redirect user after successfull registration to a required wordpress page.

REDIRECT USER ON REGISTRATION.

Have you ever wanted to redirect users to a specific wordpress page or another website page after they register to your WordPress site?

Recently i have worked on project where

user must be redirected to particular wordpress page.

Some are interested in thanking people after they register or just send them to a specific wordpress  page for newly registered members.

one can easily do tisk task with a small snippet, putting in functions.php file.

Here you have to use 'registration_redirect' filter.

code:

function redirect_user(){    return home_url( '/pagename/' );}add_filter( 'registration_redirect', 'redirect_user' );


you can return a static url instead of home_url() of any other website.

This task can be done easily through plugin " Peter’s Login Redirect "

Through plugin you can redirect user from login and even from registration page to a page were you want user to be.

No comments: