have_posts()
Determines whether current WordPress query has posts to loop over.
Return
(bool) True if posts are available, false if end of the loop.
Source
File: wp-includes/query.php
function have_posts() {
global $wp_query;
return $wp_query->have_posts();
}
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |