thanks, this is quite useful to address the issue to block out everything. what i was after is a little more fine-grained. for example there are out there a few plugins which use wordpress roles to limit access to posts or even categories. can anyone suggest a way of using a buddypress group or a field from the extended profile to limit access to posts/pages (rather than activities like forum posts etc?
i understand that if one is not member of a private group they cannot see the group activities in the stream, but how to make certain pages only accessible based on buddypress group membership?
many thanks!
@psycolor
You could look at using functions like:
groups_is_user_member( $user_id, $group_id )
To test if the user is in a specific group, and only show the page if they are in the appropriate group. This is defined in bp-groups.php.
bp_is_member()
To simply check whether the current user is a member (and logged in). This is defined in bp-core-templatetags.php
There is also a group blogs plugin: https://buddypress.org/community/groups/bp-groupblog/
I don’t know if this can be adapted to implement the private pages for your group members.
Cheers, Roger
Roger thanks for the useful suggestion.
i think that getting into modifying the plugin is out of my league, but i can definitely look into how to use the function you suggested.
i’m surpised that nobody has implemented this sort of things already!
lorenzo