6
Jak uzyskać bieżący wpis index number
w pętli WHILE?Wordpress: pobierz numer indeksu current_post w pętli 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;
Próbowałem z następującymi, ale bez rezultatu.
$index_query->post->current_post;
Wszelkie sugestie bardzo doceniane!