Maybe I can get you started with what I have. I only used this to sort and show one event but you can probably build this. I eventually want to make it so that when somebody clicks on an events category it specifically sorts these by expiration… I’ll post that later when it’s done.
But for now here is what is on my home.php page:
<?php $events_query = new WP_Query('category_name=upcoming-events&showposts=1&order=ASC&meta_key=expiration-date&orderby=meta_value');
while ($events_query->have_posts()) : $events_query->the_post(); ?>
<div id="events">
<p>Come to our event: <a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a> </p>
</div>
<?php endwhile; ?>
So as you can tell this is for events and I have this only displaying one event, the next upcoming event.
Now if I could only get that data from the post expirator and use it to display the event date… but that’s is a different battle.