bp_get_active_group_types( array $args = array() )

Get all active group types.

Description

Parameters

$args

(Optional) Arguments

Default value: array()

Return

(array) Group types

Source

File: bp-groups/bp-groups-functions.php

3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
function bp_get_active_group_types() {
    $query = new WP_Query([
        'post_per_page' => -1,
        'post_type'     => bp_get_group_type_post_type(),
        'post_status'   => 'publish',
        'fields'        => 'ids',
        'orderby'       => 'menu_order'
    ]);
 
    return $query->posts;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.