Categories
Coding

Numeric Position of Post

Just a quickie… within a WordPress loop you can easily determine the current post position via $wp_query->current_post. <?php while ( have_posts() ): the_post(); the_title(); echo $wp_query->current_post; endwhile; ?>

Just a quickie… within a WordPress loop you can easily determine the current post position via $wp_query->current_post.

<?php
while ( have_posts() ): the_post();
the_title();
echo $wp_query->current_post;
endwhile;
?>