[Membership 2 Pro] Membership & BuddyPress Integration – Registration Form missing #buddypress

I’m using Membership 2 Pro with BuddyPress and the BuddyPress Integration addon. I have Use BuddyPress Registration enabled. On the BuddyPress registration page, there is a containing DIV that the content is wrapped in:

<div id="buddypress" class="buddypress-wrap extended-default-reg">

This container DIV is missing on the Membership registration page output by the Memberships page after a user selects their membership and the registration form is displayed via the POST action=membership_signup&step=payment_table.

This container is required for the BuddyPress CSS be applied properly to the registration form.

Is there a filter for the [ms-membership-signup] shortcode that I can apply to wrap the form content on postback?

  • Adam Czajczyk
    • Support Gorilla

    Hi Cagle Webmaster

    I hope you’re well today!

    There’s no “wrapper” or attribute to the shortcode that could do this. A simple solution is just to wrap the shortcode around in that HTML directly in “Text” mode of a WP page editor or, alternatively, create a custom page template for the registration page.

    That would, however, be applied to entire registration process and if I correctly understand you want that to be added only to the “payment_table” step, right?

    If so, it might be necessary to go for some custom JS code or to use WP’s “the_content()” filter to add that HTML and trigger it based on the URL.

    That being said, I feel I might be missing something here: the “payment_table” step displays the membership information and payment buttons “native” to Membership 2 Pro, there’s no registration form there or any elements that BuddyPress would be addressing with CSS so I’m not quite sure how this would help. Wouldn’t it be easier/better to just adjust the look of that table with some additional custom CSS added to the site?

    If I’m missing something here, let me know please and I’ll look for other possible solutions.

    Best regards,


  • Cagle Webmaster
    • The Incredible Code Injector

    When the STEP is “payment_table” AND the ACTION is “membership_signup”, Membership outputs the Registration page. This is the step after you click on one of the subscription buttons in the Membership List page (e.g. “payment_table”:wink: IF you are not already a registered user; however, it’s still logically the same step.

    The BuddyPress Integration Addon lets you use the BuddyPress user registration rather than the default Membership 2 or core WP registration form. The BuddyPress page (which is physically a different page/template) outputs the container in my OP.

    I have a working solution that just wraps the content using a the_content filter but I found a filter named ms_shortcode_signup that should be where this goes but it doesn’t seem to be working. The following function works with the_content but not ms_shortcode_signup.

    add_filter( 'ms_shortcode_signup', 'filter_ms_shortcode_signup', 10, 2);
    public static function filter_ms_shortcode_signup( $html = '', $this_data = null ) {
    $html = '<div id="buddypress" class="buddypress-wrap extended-default-reg">' . $html . '</div><!-- /#buddypress -->';
    return $html;

    I’d rather have it work on the correct filter if I can. I should note, I refactored the above code, my actual code runs from within a custom plugin, but that shouldn’t make a difference. In any case, this should probably be added to the bug tracking for Membership 2 Pro for the addon. I’m pretty sure there’s a filter in BP that it needs to call to get this wrapping container properly and it’s just missing that.

  • Predrag Dubajic
    • Support

    Hi Cagle Webmaster,

    Could you try with this code and see if that works for you:

    add_filter( 'ms_frontend_custom_registration_form', function( $html ) {

    $html = '<div id="buddypress" class="buddypress-wrap extended-default-reg">' . $html . '</div><!-- /#buddypress -->';

    return $html;

    }, 30);

    I have also pinged our devs about BuddyPress add-on and they will look into this further.

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.