Why does the_date work in the loop only in the first iteration of wordpress?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
27 views
Why does the_date work in the loop only in the first iteration of wordpress?
<?phpwhile ( have_posts() ) :the_post();?>
News
Alexander Ivanov
<?php the_title(); ?><?php the_excerpt() ?>Read more...
<?php endwhile;\t?>
by | 27 views

2 Answers

0 like 0 dislike
Look at funkciu the_date and there you will see:
* Display or Retrieve the date the current post was written (once per date)
*
* Will only output the date if the current post''s date is different from the
* previous one output.
*
* i.e. Only one date listing will show per day worth of posts shown in the loop, even if the
* function is called several times for each post.
by
0 like 0 dislike
Why not say, but you should always use <?php echo get_the_date( 'j F Y' ); ?>. Always, alas why are not able to find, you can Google about the reasons.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users