Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Using Redirect to make single link for buddypress dynamic links

@henrywright

Moderator

Because on my website the usernames are on the root

OK, this should do it:

function my_redirect() {
    if ( is_page( 'me' ) && is_user_logged_in() )
        bp_core_redirect( bp_loggedin_user_domain() );
}
add_action( 'template_redirect', 'my_redirect' );

Borrowed the bp_loggedin_user_domain() idea from @shanebp 🙂

Skip to toolbar