wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



have_posts › WordPress Function

Desde1.5.0
Obsoleton/a
have_posts ( Sem parâmetros )
Retorna:
  • (bool) True if posts are available, false if end of the loop.
Definido em:
Codex:

Determines whether current WordPress query has posts to loop over.



Funções relacionadas: the_post, get_posts, have_comments, next_posts, get_post

Fonte

function have_posts() {
	global $wp_query;

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

	return $wp_query->have_posts();
}