wpseek.com
A WordPress-centric search engine for devs and theme authors



have_comments › WordPress Function

Since2.2.0
Deprecatedn/a
have_comments ( No parameters )
Returns:
  • (bool) True if comments are available, false if no more comments.
Defined at:
Codex:

Determines whether current WordPress query has comments to loop over.



Source

function have_comments() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		return false;
	}

	return $wp_query->have_comments();
}