BP_Blogs_Template::the_blog()

Set up the current blog inside the loop.

Description

Used by bp_the_blog() to set up the current blog data while looping, so that template tags used during that iteration make reference to the current blog.

See also

Source

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

	public function the_blog() {

		$this->in_the_loop = true;
		$this->blog        = $this->next_blog();

		// Loop has just started.
		if ( 0 === $this->current_blog ) {

			/**
			 * Fires if on the first blog in the loop.
			 *
			 * @since BuddyPress 1.5.0
			 */
			do_action( 'blog_loop_start' );
		}
	}

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.