diff --git a/src/bp-groups/bp-groups-template.php b/src/bp-groups/bp-groups-template.php index 9f10eda953..d7462b5ca2 100644 --- a/src/bp-groups/bp-groups-template.php +++ b/src/bp-groups/bp-groups-template.php @@ -410,7 +410,9 @@ function bp_has_groups( $args = '' ) { $args = bp_parse_args( $args, array() ); // Exclude Group Types if ( - ( empty( $args['scope'] ) || ( ! empty( $args['scope'] ) && 'all' === $args['scope'] ) ) && + ! is_admin() && // Ensure it's only running on the frontend + ! current_user_can( 'manage_options' ) && // Allow admins to see all groups on frontend + ( wp_doing_ajax() || ( empty( $args['scope'] ) || ( ! empty( $args['scope'] ) && 'all' === $args['scope'] ) ) ) && ! bp_is_user_groups() && ! bp_is_group_subgroups() && empty( $group_type ) ) {