WordPress at a glance

have_comments() WP 1.0

Whether there are comments to loop over.

  • Global. WP_Query. $wp_query Global WP_Query instance.
Works based on: WP_Query()
✈ 1 time = 0.000001s = speed of light | 50000 times = 0.02s = speed of light PHP 7.1.5, WP 4.9.2

No Hooks.





Code of have_comments: wp-includes/query.php VER 5.0.1

function have_comments() {
	global $wp_query;
	return $wp_query->have_comments();

Related Functions

From tag: Comments

More from tag: Conditional tags (all)

More from category: Comments Loop

More from Template Tags: Comments

No comments
    Hello, !     Log In . Register