Last active
August 29, 2015 13:56
-
-
Save RafaelFunchal/9182966 to your computer and use it in GitHub Desktop.
Redirect a BuddyPress member to a specific page after login
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 | |
function redirect_after_login() { | |
if( is_user_logged_in() && bp_is_register_page() ) { | |
bp_core_redirect( get_option('home') . '/page-slug/' ); | |
} | |
} | |
add_action( 'template_redirect', 'redirect_after_login', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment