Hello, recently through this post here in support, I created a table listing future events on my blog using this code in a page theme:
<?php
$args=array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 20,
'caller_get_posts'=> 1
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) { ?>
<TABLE border="1" summary="Future Events">
<CAPTION><EM>Future Events </EM></CAPTION>
<TR><TH>Event<TH>Author<TH>Where<TH>Date
<?php
while ($my_query->have_posts()) : $my_query->the_post();
$where = get_post_meta($post->ID, 'where', true);
$date = get_post_meta($post->ID, 'date', true); ?>
<tr><th><?php the_title(); ?><td><?php the_author(); ?><td><?php echo $where; ?><td><?php echo $date; ?>
<?php endwhile; ?>
</TABLE>
<?php }
wp_reset_query();
?>
Only I would like to list only the future events, not the past. Is there any way to filter the custom field (date) to display only the events of the day ahead in the table and order the table based in custom field date, and not by post id?
The custom field uses the same date format for the blog (DD/MM/YYYY)
Thanks for any help!