WP_Query::have_comments()

Whether there are more comments available.


Description Description

Automatically rewinds comments when finished.


Top ↑

Return Return

(bool) True, if more comments. False, if no more posts.


Top ↑

Source Source

File: wp-includes/class-wp-query.php

	public function have_comments() {
		if ( $this->current_comment + 1 < $this->comment_count ) {
			return true;
		} elseif ( $this->current_comment + 1 == $this->comment_count ) {
			$this->rewind_comments();
		}

		return false;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.