Created
January 18, 2015 19:26
-
-
Save shahadat014/8b5eaa00d74dfc7574ce to your computer and use it in GitHub Desktop.
Redirect to custom page
This file contains hidden or 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