have_comments()
Whether there are comments to loop over.
Description Description
Return Return
(bool)
Source Source
File: wp-includes/query.php
function have_comments() { global $wp_query; return $wp_query->have_comments(); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.2.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Basic Example
Example based on Twentyten’s comments.php template: Comments title (and more) is displayed only when comments are available:
Expand full source codeCollapse full source code