bp_get_blog_id()

Return the ID of the current blog in the loop.

Description

Return

(int) ID of the current blog in the loop.

Source

File: bp-blogs/bp-blogs-template.php

	function bp_get_blog_id() {
		global $blogs_template;

		/**
		 * Filters the ID of the current blog in the loop.
		 *
		 * @since BuddyPress 1.7.0
		 *
		 * @param int $blog_id ID of the current blog in the loop.
		 */
		return apply_filters( 'bp_get_blog_id', $blogs_template->blog->blog_id );
	}

Changelog

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