Skip to:
Content
Pages
Categories
Search
Top
Bottom

Members Only BuddyPress

  • Avatar of christianmarriagebloggers
    christianmarriagebloggers
    Member

    @christianmarriagebloggers

    Hello! I really like what I’m seeing in Buddypress but I would like to create a Members Only site, with only approved members able to see anything other then a basic front page, log in page, or registration page.
    I attempted to combine WP-Members plugin with Buddypress, but there seems to be overlap issues.

    I’m sure that someone out there has created another members only page, does anyone have a guide, or advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of christianmarriagebloggers
    christianmarriagebloggers
    Member

    @christianmarriagebloggers

    Additional info. I’ve see that other membership plugins say that they work (i.e. Members Only and DAP to be spicific) Since these are both subscription sites, I want to know that someone has experience with applying them to Buddypress before I take the leap. After my unsuccessful attempts with WP-Members.

    If anyone has any Free ways I would love to know, If there are only premium ways, that is fine, I just want to make sure it integrates.
    Thanks!

    Avatar of aces
    aces
    Participant

    @aces

    Couldn’t you use something like travel-junkie’s walled garden technique:
    `
    function sh_walled_garden()
    {
    global $bp;
    if( bp_is_register_page() || bp_is_activation_page() || bp_is_page( BP_FORUMS_SLUG ) || bp_is_page( BP_GROUPS_SLUG ) )
    return;

    if( ! bp_is_blog_page() && ! is_user_logged_in() )
    bp_core_redirect( bp_get_signup_page() );
    }
    add_action( ‘bp_init’, ‘sh_walled_garden’ );
    `
    This goes in bp-custom.php and hides members and activity from those not logged in but enables forums and groups for everyone. It can also be customised…..

    if you want complete private community I used the code of david carson described in this thread:
    http://wordpress.org/support/topic/theme-frisco-for-buddypress-login-in-home-page?replies=18

    here is the code you need to paste in a bp-custom.php in you plugin directory.
    Note: that not logged in users are redirected to slug/register page, you have to change it if your register page has a different URL.

    ‘<?php

    // **** Privacy ********
    function restrict_access(){
    global $bp, $bp_unfiltered_uri;

    // If user is not logged in and
    if (!is_user_logged_in() &&
    (
    // The current page is not register or activation
    !bp_is_register_page() &&
    !bp_is_activation_page()
    )

    ) {
    // Redirect to registration page. Change /register to your register page slug
    bp_core_redirect( get_option(‘home’) . ‘/register’ );
    }
    }

    add_action( ‘wp’, ‘restrict_access’, 3 );

    http://pastebin.com/rgJ6BQc8

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.