Advertisements

have_posts

Definition:
function have_posts() {}

Whether current WordPress query has results to loop over.

Defined actions

  • loop_end
    do_action_ref_array('loop_end', array(&$this));

Source code

	function have_posts() {

		if ( $this->current_post + 1 < $this->post_count ) {

			return true;

		} elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {

			do_action_ref_array('loop_end', array(&$this));

			// Do some cleaning up after the loop

			$this->rewind_posts();

		}



		$this->in_the_loop = false;

		return false;

	}

1943

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: