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)
  • @cogden-1

    Participant

    weird (doesn’t let me edit my post to check the box for recieve email notifications for replies, so I had to post a reply to check the box

    @bphelp

    Participant

    @cogden-1
    Try this plugin I made. This only makes BuddyPress and bbPress private.
    https://wordpress.org/plugins/private-bp-pages/
    Also make sure you read the FAQ first:
    https://wordpress.org/plugins/private-bp-pages/faq/
    Make sure you clear the previous code out of bp-custom.php that you posted above!

    @cogden-1

    Participant

    Sweet thanks! I gave your app 5 stars.

    @cogden-1

    Participant

    ok so it worked on my test site, now it wont work on the main site im working on. I have it installed on anandapdx.anandaportlandsangha.org it gave me the line 8 error so i did as instructed in the faq and now when i log out and goto the bp pages it goes there as if I hadn’t installed the plugin at all. Let me know what info you need to look into it. Thanks!

    @synaptic

    Participant

    @bp-help can you pls describe what the difference is between your plugin and S2member (the free edition)?

    Not that your plugin isn’t great, I’m just trying to understand things a bit more 🙂

    thanks!

    @tse11

    Participant

    @synaptic

    Participant

    thanks @tse11 but that’s not what I was asking :).

    I’ve already seen the tutorial you linked to and btw, that tutorial has nothing to do with S2member or the private plugin @bp-help developed so I’m rather confused

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