Redirecting to BBPress profile via functions.php
-
Hello,
I added the follwoing code to functions.php
add_action( ‘init’, ‘blockusers_init’ );
function blockusers_init() {
if ( is_admin() && ! current_user_can( ‘administrator’ ) &&
! ( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) ) {
wp_redirect( bbp_user_profile_link( bbp_get_current_user_id() ) );
exit;
}
}This redirects users to http://www.mydomainame.org/wp-admin/profile.php
and displays a link to their BBPress Profile.
Question is, how do I redirect users directly to to their BBPress profile?This is probably something very simple, but I am not a developer unfortunately.
Thanks for your help.
- You must be logged in to reply to this topic.