Redirect Buddypress profile to membership account

How can I redirect from the Buddypress profile page to the Membership 2 account page? It's just to avoid users to have to 2 pages and the in particular, the Membership 2 account page would allow the user to modify their membership category too

  • Luís

    Hi GJ ,

    Hope you're doing well today!

    After further tests, I believe this code will help you in this task. You can add it on your theme functions.php or via mu-plugin:

    add_action( 'template_redirect', 'redirect_to_account_page' );
    
    function redirect_to_account_page() {
    if (bp_is_user_profile() ) {
    	wp_redirect('url-of-the-membership-account-page');
    	exit;
    }
    }

    Just replace the "url-of-the-membership-account-page" with the correct URL of the your Membership Account page.

    I hope this information has been helpful. If I can help you in this or other related question, please let me know!

    Cheers, Luís

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.