Skip to:
Content
Pages
Categories
Search
Top
Bottom

Making Buddypress Private.

  • @cogden-1

    Participant

    I have scoured the internet for help making Buddypress private and am having an intense difficulty with dependable advice. First off before we get into how this can work, I’d first like to ask why a private network is such a difficult thing to accomplish? Shouldn’t it be one of the simpliest things a social network can offer? Whats the deal? Anybuddy know? Thanks in advance. Very discouraging.

    Ok so how on gods green earth do I make buddypress inaccessible to non logged in users?
    I’m not much of a programer but I am using Filezilla so I can insert custom code. I tried a bit of code offered by @bphelp

    /* Block BP Pages For Non-Logged In Visitors */
    function bp_block_pages() {
    global $bp;
    if ( bp_is_activity_component() || bp_is_groups_component() /*|| bbp_is_single_forum()*/ || bp_is_forums_component() || bp_is_blogs_component() || bp_is_page( BP_MEMBERS_SLUG ) ) {
    // add components to be blocked to non-logged in visitors
    if(!is_user_logged_in()) {
    wp_redirect( get_option(‘siteurl’) . ‘/register’ );
    } // Change /register to the page you want non-logged in visitors directed to
    }
    }
    add_filter(‘get_header’,’bp_block_pages’,1);
    /* End BP Blocked Pages */
    /* Remove RSS Feeds */
    function bp_remove_feeds() {
    remove_action( ‘bp_actions’, ‘bp_activity_action_sitewide_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_personal_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_friends_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_my_groups_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_mentions_feed’, 3 );
    remove_action( ‘bp_actions’, ‘bp_activity_action_favorites_feed’, 3 );
    remove_action( ‘groups_action_group_feed’, ‘groups_action_group_feed’, 3 );
    }
    add_action(‘init’, ‘bp_remove_feeds’);
    /* End Remove RSS Feeds */

    but when I went to see if it was working i found my front page completely blank.

    Here is my url http://www.starhearts.net/front-page

    I added the code to bp-custom.php as dirrected.

    Thanks so much!

    C.ogden

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Making Buddypress Private.’ is closed to new replies.
Skip to toolbar