Currently I am develop a WP Themes, according to Function Refference in Template Tag (function Reference), I write this code on sidebar.php to show the 5 recent post ordered by date and showed the post date:
`
-
<?php
- "><?php the_title(); ?><span class="floatright"><?php the_date(); ?></span>
$postslist = get_posts('numberposts=5&order=DESC&orderby=date');
foreach ($postslist as $post) :
setup_postdata($post);
?>
<?php endforeach; ?>
`
the result look fine, post title and permalink worked, but I thinking seriously and take more 3 times to try, why the date not showed on every post, later i realized the post that has no date showed was have same date (day) with other post. See illustration below (according to the code above):
My Recent Posts
- 10 Most Wanted Candy | May 16, 2009 (showed)
- The cutest baby in the world | April 30, 2009 (showed)
- Red cube in the water | April 20, 2009 (This date not showed)
- A boy on the big boat | April 20, 2009 (This date not showed)
- The way to have fun with pets | April 20, 2009 (This date not showed)
Question: why the date on posts with some dates not showed... this is a bug?