Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Siddharth Pereira
    Participant

    @wickedbl0ke

    bp-help

    Works like a charm. can i make love to you?

    Thanks

    Resolved.


    Siddharth Pereira
    Participant

    @wickedbl0ke

    OK. So i found a partial solution.

    I tried adding the below pasted snippet to my bp-custom.php file inside my plugin folder and it worked for the activity page. I dont want to sound like a complete noob but can someone tell me how do i replicate this for the members and group page?

    I tried variations of the code to support _groups_component and _members_component but that didnt work.

    /* Prevent logged out users from accessing bp activity page */
    function nonreg_visitor_redirect() {
    global $bp;
    if ( bp_is_activity_component() ) {
    if(!is_user_logged_in()) { //just a visitor and not logged in
    wp_redirect( get_option(‘siteurl’) . ‘/wp-login.php’ );
    }
    }
    }
    add_filter(‘get_header’,’nonreg_visitor_redirect’,1);

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar