Last active
April 13, 2021 04:22
-
-
Save strangerstudios/615a1eba163eb4af04ef0ca5f86a1072 to your computer and use it in GitHub Desktop.
Add the [pmpro_account] shortcode before other bbPress Profile content.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Add the [pmpro_account] shortcode before other bbPress Profile content. | |
*/ | |
function my_pmpro_bbp_template_before_user_profile() { | |
global $current_user; | |
$bbp_user_id = bbp_get_user_id( 0, true, false ); | |
if($bbp_user_id == $current_user->ID && shortcode_exists( 'pmpro_account' )) | |
echo do_shortcode('[pmpro_account]'); | |
} | |
add_action('bbp_template_before_user_profile', 'my_pmpro_bbp_template_before_user_profile', 15, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Set the bbPress User Profile as Membership Account Page" at Paid Memberships Pro here: https://www.paidmembershipspro.com/set-bbpress-user-profile-membership-account-page/