Codex

Riferimento funzioni/the post

Contents

Descrizione

Itera l'indice dell'articolo nel Il Loop. Recupera l'articolo successivo, imposta l'articolo ed imposta la proprietà 'in the loop' a true.

Utilizzo

<?php the_post(); ?>

Parametri

Questa funzione non accetta alcun paramentro.

Valori di ritorno

Questa funzione non restituisce alcun valore.

Esempi

<?php
while ( have_posts() ) : the_post();
	echo '<h2>';
	the_title();
	echo '</h2>';
	the_content();
endwhile;
?>

Note

Change Log

File sorgente

the_post() si trova in wp-includes/query.php.

Correlati

Query Tags: WP_Query (Classe), get_query_var(), query_posts(), have posts(), the_post(), rewind_posts(), wp_reset_postdata(), wp_reset_query()

See also index of Function Reference and index of Template Tags.