Re: Privacy options (friends only viewing)
When i placed your code,it shows this error message
Fatal error: Cannot use object of type stdClass as array in /home/username/public_html/sitename/wp-content/bp-themes/bpmember/friends/index.php on line 13
If you update your code thusly, it should work:
<?php
global $bp, $wpmu;
$potential_friend_id = $bp->displayed_user;
$friend_status = BP_Friends_Friendship::check_is_friend( $bp->loggedin_user, $potential_friend_id );
if ( $friend_status != 'is_friend' && $potential_friend_id != $bp->loggedin_user) {
echo "You must be friends to view this profile.".bp_add_friend_button();
} else { ?>
And of course add the
<?php } ?>
at the end.