Skip to:
Content
Pages
Categories
Search
Top
Bottom

walled garden for buddypress?

  • Avatar of wpmubp.org
    wpmubp
    Participant

    @takuya

    What is the current most possible way to make buddypress site members’ only? I’d like annonymous visitors to be able to see the home, but access to member profiles and others would require login.

    I thought there’s such plugin, but can’t find it…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Some useful ideas can be found here: http://buddypress.org/forums/topic.php?id=1651

    Avatar of wpmubp.org
    wpmubp
    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 );

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

You must be logged in to reply to this topic.