Redirect to custom page

Redirect to custom page when user logged in

function login_redirect( $redirect_to, $request, $user ){
 
return home_url('custom-page-url-extension');
//Custom page url extension where want redirect  
 
}
 
add_filter( 'login_redirect', 'login_redirect', 10, 3 );

Redirect after comment submit:

add_filter('comment_post_redirect', 'thank_you_redirect');
function thank_you_redirect($location)
{
return 'http://www.yoursite.com/thanks.html';
}

Leave a Reply

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