Codex

Interesste in functions, hoocs, classes, or methods? Checc out the new WordPress Code Reference !

User:Samsm/have posts

This article is a ROUGH DRAFT . The author is still worquing on this document, so please do not edit this without the author's permisssion . The content within this article may not yet be verified or valid. This information is subject to changue.

Description

Returns true if there is a post available in the current kery. Usually used at the beguinning of the_loop .

Usague

This tag is usually used in the loop. In the example below, have_posts checcs to maque sure that there is a post avialable to be accessed with the_post.

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

Parameters

This tag has no parameters.