Skip to:
Content
Pages
Categories
Search
Top
Bottom

non members block

  • @richiels

    Member

    I dont want to show activity stream or profiles for non members.

    Now when a person comes to my site they can still click the activity, members, groups etc tabs and then click their way thru all profiles.

    How can i prevent this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @shanebp

    Moderator

    Create a file called bp-custom.php – it will go in your plugins directory.

    Put this code in it:

    function visitor_intercept(){
    global $bp_unfiltered_uri;
    
    if ( !is_user_logged_in() ) {
    if ( ($bp_unfiltered_uri[0] == BP_MEMBERS_SLUG) || ($bp_unfiltered_uri[0] == BP_ACTIVITY_SLUG) ) {
    bp_core_redirect( get_option('siteurl')."/some-page" );
    }
    }
    }
    add_action( 'wp', 'visitor_intercept', 3 );
    

    Change “same-page” to where ever you want to send them or remove to send them to front page.
    Note: this may not work if you are using BP 1.3

    @richiels

    Member

    Nope. Now the whole site crashed instead…….

    @richiels

    Member

    I´m trying out registered-users-only-2 plugin and that works fine. Except for one thing. I get a red frame that says “Only registered users can watch this site. Please register or login” Is it someway to get rid of that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘non members block’ is closed to new replies.
Skip to toolbar