Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Really need help on privacy. Complete noob here

@billzy

Participant

I took a different approach to this that worked… I was looking to hide content from people who are not friends… In any pages that friends are not connected I did this..

?php if ( bp_is_friend() != ‘is_friend’ ) {
if (bp_current_user_id() != bp_loggedin_user_id()):
locate_template( array( ‘members/single/not-friends.php’), true )
endif;
}
php if (bp_current_user_id() == bp_loggedin_user_id() || ( bp_is_friend() == ‘is_friend’ ) ): ?>
// add page content for friends
?php endif; ?>

for groups you can do the similar with bp_group_is_member()

naturally you would need to create;
members/single/not-friends.php

but this way you take away the permissions settings from your users and control them yourself with your theme…. With a little bit of configuring you can do the same with users who are not logged in.

Hope this helps…

Cheers

Skip to toolbar