BuddyPress + ProSites Signup Integration

I'd like to accomplish 1 of 2 things; the first being preferred.

Optimal Situation: When a user goes to pinestreetnetwork.com/signup and checks the "yes I would like to create a new site" the content from pinestreetnetwork.com/pro-site/ is displayed and the registration is seamless for the MU site, BP and Pro Site.

If this can't be achieved, how do I push the user to /pro-site/ after activation?

Also, I have a php developer, so if the first option is not currently configurable out of the box, some advice on which .php files to modify would be great.

  • Ash

    Hello @Clayton Garrett

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    Please try the following code:

    add_action( 'wpmu_activate_blog', 'wpmu_activate_blog_cb', 99, 5 );
    function wpmu_activate_blog_cb( $blog_id, $user_id, $password, $title, $meta ) {
        wp_redirect( network_site_url( 'pro-sites' ) . '?bid=' . $blog_id );
        wp_die();
    }

    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.

    Cheers
    Ash

  • Clayton Garrett

    Putting the code into the functions.php file does not seem to have any affect. When I put it in the mu-plugins folder I get the following error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/pinenet/public_html/wp-content/mu-plugins/Integratedsignup.php:5) in /home/pinenet/public_html/wp-content/plugins/sitewide-privacy-options/sitewide-privacy-options.php on line 591