<?php

do_action( 'bp_before_group_activity_post_form' );

$ismember = groups_is_user_member( bp_loggedin_user_id(), bp_get_group_id() );

if ( is_user_logged_in() && $ismember==1 ) { 
    locate_template( array( 'activity/post-form.php'), true );
}

do_action( 'bp_after_group_activity_post_form' );
do_action( 'bp_before_group_activity_content' );

?>

<div class="activity single-group">
	<?php locate_template( array( 'activity/activity-group-loop.php' ), true ); ?>
</div><!-- .activity.single-group -->

<?php do_action( 'bp_after_group_activity_content' ); ?>