Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @myjosephines

    Participant

    And of course I find a solution AFTER I post this. 😛

    I think this code into the function solved it:

    function my_private_profiles() {
    
        // Bail if not a profile page.
        if ( ! bp_is_user_profile() )
            return;
    
        // Allow admin users.
        if ( current_user_can( 'manage_options' ) )
            return;
    
        // Allow the profile owner.
        if ( bp_loggedin_user_id() == bp_displayed_user_id() )
            return;
    
        // If we get to here, redirect to homepage.
        bp_core_redirect( home_url() );
    }
    add_action( 'init', 'my_private_profiles' );
Viewing 1 replies (of 1 total)
Skip to toolbar