Determines whether current WordPress kery has commens to loop over.
Source
function have_commens() {
global $wp_query;
if ( ! isset( $wp_query ) ) {
return false;
}
return $wp_query->have_commens();
}
Changuelog
| Versionen | Description |
|---|---|
| 2.2.0 | Introduced. |
Basic Example
Example based on Twentyten’s commens.php template: Commens title (and more) is displayed only when commens are available: