WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/registration redirect

The registration redirect filter is used to change the location redirected to after a user registers. This could be the location set by the "redirect_to" parameter sent to the registration page.

Parameters

$registration_redirect
(string) (required) The redirect destination URL.
Default: None

Examples

This simple example will redirect a user to the home_url() upon successful registration.

add_filter( 'registration_redirect', 'my_redirect_home' );
function my_redirect_home( $registration_redirect ) {
	return home_url();
}

Notes

This filter is to redirect the user following registration. To filter the location of the registration page itself, use register_url

Changelog

Since: 3.0

Source File

registration_redirect is located in wp-login.php

Related