@bridieamelia
Active 4 years, 11 months ago
-
Henry Wright replied to the topic [Resolved] Redirect from members page to profile page in the forum How-to & Troubleshooting 10 years, 3 months ago
Hi @bridieamelia,
Try this:
function redirect_members_page() {
if ( bp_is_user_profile() && ! bp_is_my_profile() ) {
$user = get_userdata( get_current_user_id() );
wp_redirect( home_url() . '/members/' . $user->user_login . '/profile/' );
exit;
}
}
add_action( 'template_redirect', 'redirect_members_page'…