Add Membership Pro 2 links to Buddypress member's profile

Hi again,

I would like to add the Membership Pro links to the Buddypress members page so that they show along with Activities, Friends, Messages and the likes. Maybe a main link for "Memberships" that displays all the neccessary options to keep the memberpage as slim as possible.
I found some tipps that involved working with functions.php or another php from buddypress. I haven't done that before. So little insecure. Would be a shame to loose the changes with every update.

Thanks again,
Peter

  • Patrick

    Hi there Peter

    I hope you're well today!

    That is certainly doable, and you would not lose changes with plugin updates if you are using a child-theme, which is always the recommended any time you want to make any customizations to your existing theme.

    Basically, all you would need to do is make a copy of this template from BuddyPress:
    buddypress/bp-themes/bp-default/members/single/member-header.php.

    Then create a folder in the root of your child-theme called buddypress, create another folder inside that called members, another inside that called single, and add your copy of member-header.php inside that.

    You can then customize that template and add any shortcodes you like where you want them to appear, by using the do_shortcode function, like this:
    <?php echo do_shortcode ('[ms-membership-account-link]');?>

    More on do_shortcode here:
    https://developer.wordpress.org/reference/functions/do_shortcode/