groups_get_groupmeta( int $group_id, string $meta_key = '', bool $single = true )

Get a piece of group metadata.

Description

Parameters

$group_id

(Required) ID of the group.

$meta_key

(Optional) Metadata key.

Default value: ''

$single

(Optional) If true, return only the first value of the specified meta_key. This parameter has no effect if meta_key is empty.

Default value: true

Return

(mixed) Metadata value.

Source

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

function groups_get_groupmeta( $group_id, $meta_key = '', $single = true ) {
	add_filter( 'query', 'bp_filter_metaid_column_name' );
	$retval = get_metadata( 'group', $group_id, $meta_key, $single );
	remove_filter( 'query', 'bp_filter_metaid_column_name' );

	return $retval;
}

Changelog

Changelog
Version Description
BuddyPress 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.