I want to redirect users upon registration, login, or any operation, to a specific page. If the user does something something like click "go back", the displayed notice should disappear.
What function would I use?
add_action('redirectToProfil', array( $this, 'redirectToProfile' ));
public function redirectToProfile(){
$url = get_site_url(null, '/profile');
wp_safe_redirect( $url );
exit;
}
do_action('redirectToProfil');
I tried using $_GET
parameters, but it did not work for me.
SOLUTION
I use $_SESSION[]
.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745307018a4621771.html
评论列表(0条)