Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

it:Riferimento funzioni/rewind posts

This page redirects to an external site: https://developer.wordpress.org/reference/functions/rewind_posts/

This page is marked as incomplete. You can help Codex by expanding it.

Descrizione

Riavvolge il ciclo (loop) degli articoli.

Utilizzo

<?php rewind_posts(); ?>

Parametri

Questa funzione non accetta alcun parametro.

Valori restituiti

Questa funzione non restituisce alcun valore.

Esempi

// ciclo principale
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>

// rewind
<?php rewind_posts(); ?>

// nuovo ciclo
<?php while (have_posts()) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>

Log delle modifiche

File sorgente

rewind_posts() 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()

Si veda anche l'indice di Riferimento funzioni e l'indice di Tag dei template.