Получите Post Index WordPress
<?php $i = 0; while ( have_posts() ) : the_post(); ?>
<?php
//do something
$i++;
?>
<?php endwhile; ?>
Andrew Lautenbach
<?php $i = 0; while ( have_posts() ) : the_post(); ?>
<?php
//do something
$i++;
?>
<?php endwhile; ?>
$index_query->current_post;
$index_query->post->current_post;