Created
January 5, 2019 09:22
-
-
Save Tsunamijaan/b851b1c1aa082551fbef3a9f73e2ab23 to your computer and use it in GitHub Desktop.
Redirect to custom page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment