So I have a loop that runs perfect for events and only shows future posts. The issue is that I would love to keep posts that are no longer future posts in the loop for an extra day.
Example: So if the event (or post that is scheduled) is for 8pm on the 3rd. As of now it is removed at 8pm (which is an issue because it might last for 4 hours).
I would like posts to remain up for an extra day, or time that I would be able to alter.
Here is my current code:
<?php
$args = array( 'post_type' => 'event', 'posts_per_page' => 50, 'post_status' => 'future', 'order' => 'ASC' );
$loop = new WP_Query( $args );
if ( have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();?>
<div class="teaser-event <?php the_field('highlight') ?>">
<div class="event-meta gold">
<div class="event-date"><?php the_time('M d'); ?></div>
<div class="event-time"><?php the_time('g:i A'); ?></div>
</div>
<div class="event-title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
<?php the_title(); ?>
</a>
</div>
</div>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>