I want to set a group of posts grouped by date as a list. Below is what I would like to have:
Day...
<ul>
<li><a href="#">Lorem ipsum</a></li>
</ul>
Previous day...
<ul>
<li><a href="#">Lorem ipsum</a></li>
<li><a href="#">Lorem ipsum</a></li>
</ul>
I did that:
<?php while (have_posts()) : the_post(); ?>
<?php the_date(); ?>
<li><a href="#"><?php the_time(); ?><?php the_title(); ?></a></li>
<?php endwhile; ?>
I don't really know where to put the < ul > or < /ul > tags. Any idea?
Actually, setting the starting tag is OK by doing this:
<?php the_date('','','<ul>'); ?>
But I can't figure out how to set the closing tag.
Regards, Alex