have_posts()
have_posts() 当前WordPress查询是否有要循环的结果。Whether current Wor…
have_posts()
当前WordPress查询是否有要循环的结果。
Whether current WordPress query has results to loop over.
当前WordPress查询是否有要循环的结果。
Whether current WordPress query has results to loop over.
目录锚点:#返回#源码#笔记
返回(Return)
(bool)
源码(Source)
/**
* Whether current WordPress query has results to loop over.
*
* @since 1.5.0
*
* @global WP_Query $wp_query
*
* @return bool
*/
function have_posts() {
global $wp_query;
return $wp_query->have_posts();
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.0 | wp-includes/query.php:926 | 3 | 1 function |
笔记(Notes)
默认使用:
避免无限循环:
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!