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

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.