Including BuddyPress Profile fields in Protected Content Registration

Before using Protected Content our site registration page used a BuddyPress template that included profile fields. Is there a way to modify the registration page template in a child theme so that we can get this profile information upon registration? I've looked through the plugin files and the only template I can see is for a single invoices. Is there a function I could use to modify the output on the registration page?

Thank you.

  • Tyler Postle

    Hey Support,

    Hope you're doing well today!

    Last I heard we actually have integration with BuddyPress coming soon for Protected Content :slight_smile: quite a few members have been asking for it - I don't have an ETA, but it is being worked on now.

    In the meantime, it would take quite a bit of customization to get it working correctly. Would using an alternative solution such as Gravity forms or Pie Register work for you in the meantime? Then you can have them sign up there and redirected to the membership selection page, or even just use BuddyPress sign up then send them to the membership selection page after.

    Hope this helps! Let us know if you have any further questions.

    All the best,

  • Ash

    Hello @support

    I hope you are well today.

    Please try the following code:

    add_action( 'user_register', 'add_membership_on_register', 10, 1 );
    function add_membership_on_register( $user_id ) {
    	// Give the membership ID here
    	$mem_id = 28;
    	$mem = new MS_Controller_Member();
    	$mem->member_list_do_action( 'add', array( $user_id ), $mem_id );

    Change your membership ID.

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.