Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Register BuddyPress member types to be assigned based on Membership Level when using the BuddyPress Add On for Paid Memberships Pro
<?php
/*
* Register BuddyPress member types to be assigned based on Membership Level when using the
* BuddyPress Add On for Paid Memberships Pro (https://www.paidmembershipspro.com/add-ons/buddypress-integration/).
*
* If you are using BuddyPress v2.3+ and would like to use the Member Specific Directory option,
* update this function to use the bp_register_member_types hook.
* See: https://codex.buddypress.org/developer/member-types/
*/
function my_pmpro_bbg_register_member_types() {
bp_register_member_type( 'student', array(
'labels' => array(
'name' => 'Students',
'singular_name' => 'Student',
),
) );
bp_register_member_type( 'faculty', array(
'labels' => array(
'name' => 'Faculty',
'singular_name' => 'Faculty',
),
) );
}
add_action( 'bp_init', 'my_pmpro_bbg_register_member_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.