Created
October 4, 2019 10:55
-
-
Save svenl77/41324ab8df560487ab236fbb71884517 to your computer and use it in GitHub Desktop.
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
<?php | |
function buddyforms_redirect_a_page_to_the_buddypress_profile() { | |
if( is_page( 2 ) ) { | |
if(is_user_logged_in()){ | |
wp_safe_redirect( bp_loggedin_user_domain() ); | |
exit; | |
} | |
} | |
} | |
add_action( 'wp', 'buddyforms_redirect_a_page_to_the_buddypress_profile' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment