Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to make buddypress member home page private for everyone


  • drzoiberg
    Participant

    @drzoiberg

    Hi

    I make member profile page private for everyone with this snippets in my child theme functions.php file:

    
    function remove_xprofile_links() {
        remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 3 );
    }
    add_action( 'bp_init', 'remove_xprofile_links' );
    
    function my_private_profiles() {
        if ( ! bp_is_user_profile() )
            return;
        if ( current_user_can( 'manage_options' ) )
            return;
        if ( bp_loggedin_user_id() == bp_displayed_user_id() )
            return;
        bp_core_redirect( home_url() );
    }
    add_action( 'init', 'my_private_profiles' );
    

    But I need to disable the members access to a single user front page. Can you help me?

    Thanks in advance!

  • You must be logged in to reply to this topic.
Skip to toolbar