Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show all posts and comments in BP group – friend or not


  • davidtuttle
    Participant

    @davidtuttle

    Hi,

    I am using WP 4.6.1 in a network site, directory install using a Divi child theme. I have BuddyPress 2.6.2 with BuddyBlock, BuddyPress Cover Photo, BuddyPress Group Email Subscription and BuddyPress Group Tags. No bbPress.

    I would like to make all posts and comments in a group visible to anyone who joins the group. At the moment group members can only see the posts and comments of their friends.

    This implies that if a new member wants to see all the activity in a group, they have to send friend requests to everyone in the group.

    I believe this should be done in bp-custom.php with code something like the following. I don’t know if I should be using the ‘has_groups’ or ‘has_activites’ loop or some other loop. I confirmed that bp_is_group_single does target the page in question because I could change the per_page entries successfully.

    function make_all_group_comments_visible( $loop ) 
    {
     if ( bp_is_group_single() ) {
    		 $loop['??????'] = '????';
    	 }
      return $loop;
    }
    add_filter( 'bp_after_has_activities_parse_args','make_all_group_comments_visible');

    Thanks for any suggestions,

    David Tuttle

Viewing 1 replies (of 1 total)

  • davidtuttle
    Participant

    @davidtuttle

    Topic is resolved. Comments were being restricted in them folders function.php. I added check for bp_is_group_single. Current code:

    //Restrict access to BP to logged-in users only
    function my_filter_activity( $loop ) {

    // added 10/19/16 D.T. – show all comments in single group home page
    if ( !bp_is_group_home() )
    $loop[‘scope’] = ‘just-me,friends’;

    return $loop;
    }
    add_filter( ‘bp_after_has_activities_parse_args’, ‘my_filter_activity’ );

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar