Reputation: 1185
How can I achieve something similar to this:
http://anidemon.com/latest-episodes/
Latest Posts are organized under header of the day. I don't about the "View" count.
How can I do this?
Upvotes: 1
Views: 224
Reputation: 26
Virendar,
Using get_posts() should solve your problem as follows...
<ul>
<?php
$myposts = get_posts('orderby=date&order=DESC');
$tempdate = '';
foreach($myposts as $post) {
$postDate = strtotime( $post->post_date );
if ($tempdate == '' || $postDate < $tempdate) {
$tempdate = $postDate;
echo '<h3>Display Date Title here</h3>';
}
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php } ?>
</ul>
Hope this helps! Please note I haven't included any CSS formatting.
Upvotes: 1