6
Come ottenere il post corrente index number
all'interno del ciclo WHILE?Wordpress: ottieni il numero di indice di current_post nel ciclo WHILE
$index_query = new WP_Query(array('post_type' => 'post', 'orderby' => 'modified', 'posts_per_page' => '-1', 'order' => 'DESC'));
while ($index_query->have_posts()) : $index_query->the_post();
// echo current post index number
endwhile;
Hanno provato con il seguente, ma nessun risultato.
$index_query->post->current_post;
Qualsiasi suggerimento molto apprezzato!