Show Future Events On Calendar

By default, Pie Calendar will not show events on your calendar that are scheduled or in draft status.

If you want to show 'future' or 'draft' events alongside published events, you can use the code snippet below to show published, future, and draft posts.

add_filter('piecal_event_query_args', 'pc_show_future_events', 10, 2);

function pc_show_future_events( $args, $atts ) {

    $args['post_status'] = ['publish', 'future', 'draft'];

    return $args;
}

Note: Events in 'draft' or 'future' will show a 404 error to non-logged in users if they click "View Post" in the popover. You'll need to consider how you want to handle this.

If you want to hide the event link in the popover, you can use the following CSS:

.piecal-popover__inner a {

display: none;

}

Not sure where to add this code? Watch this video!

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.