Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: walled garden for buddypress?


takuya
Participant

@takuya

following the thread Jeff posted…

I used Burt\\\\\\\’s code. But it was lacking member directory and profile restriction, so here\\\\\\\’s the code I\\\\\\\’m using at moment.

BP_ was missing before MEMBERS_SLUG on the original.

function oci_restrict_access(){

global $bp, $bp_unfiltered_uri;

if (!is_user_logged_in() &&

(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] && !empty( $bp->current_action ) ||

BP_GROUPS_SLUG == $bp->current_component && !empty( $bp->current_action ))){

bp_core_redirect( $bp->root_domain );

}

}

add_action( \’wp\’, \’oci_restrict_access\’, 3 );

Skip to toolbar