Created
June 2, 2020 11:59
-
-
Save andrewlimaza/f7783e9168e6b1bbfc99aa92431e56a3 to your computer and use it in GitHub Desktop.
Example of pmpro_login_redirect_url filter
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
<?php | |
/** | |
* Example to redirect all user's to a specific page when logging in via Paid Memberships Pro site. | |
*/ | |
function my_login_redirect( $redirect_to, $request, $user ) { | |
return home_url(); // redirect to home page on login. | |
} | |
add_filter( 'pmpro_login_redirect_url', 'my_login_redirect', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment