Support

Account

Home Forums General Issues Show only future event Reply To: Show only future event

  • you could do it after query with php with code like that:

    <?php while($event->have_posts()) : $event->the_post(); 
    $today = date('Ymd');
    $event_date = get_field('date');
    if (strtotime($today) <= strtotime($event_date)) {
    ?>
    <li>
     Posted on: <?php the_field('date'); ?><a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
    </li>
    <?php } endwhile; ?>

    else you need to work with meta_value that is always build like 20150430 year month day without spaces, no matter what input or output format you give the date field with acf settings for that field.