wpseek.com
WordPress开发者和主题制作者的搜索引擎



have_posts › WordPress Function

Since1.5.0
已弃用n/a
have_posts ( 没有参数 )
返回:
  • (bool) True if posts are available, false if end of the loop.
定义在:
文档:

Determines whether current WordPress query has posts to loop over.



源码

function have_posts() {
	global $wp_query;

	if ( ! isset( $wp_query ) ) {
		return false;
	}

	return $wp_query->have_posts();
}