How to Control the Display of Past Events in The Events Calendar
Content
One of the most common points of confusion for users of The Events Calendar plugin is how it handles events that have already happened. By default, the plugin is designed to focus on upcoming events, but this behavior can sometimes clash with a website's needs, such as maintaining an event archive or preventing outdated information from being displayed.
Why This Happens
The Events Calendar is fundamentally built to showcase what's happening next. Its default settings are optimized for this purpose. A key behavior to understand is that when no upcoming events exist for a given view (like a specific category or month), the plugin will automatically switch to show the "latest past events." This automatic switch is a core feature, not a bug, but it can be surprising if you're not expecting it. Furthermore, certain elements, like the "Add to Calendar" buttons, appear on all events by default, regardless of their date.
Common Solutions for Managing Past Events
1. Disabling the "Latest Past Events" View
If you prefer that your calendar or event list shows absolutely nothing when there are no upcoming events—instead of reverting to past events—you can disable this feature. This is a common request for category pages that should only ever display future events. The 'The Events Calendar' team provides an official method to turn this off, which you can find in their knowledge base article on Disabling "Latest Past Events".
2. Manually Navigating to Past Events
It's important to know that your past events are not deleted; they are simply archived. You and your site visitors can always view them by using the navigation arrows within the calendar's month or list views to go back in time. This is the default, out-of-the-box way to access historical event data without any custom code.
3. Using Shortcodes (Pro Feature)
For more control over exactly which events are displayed on a page, The Events Calendar Pro plugin offers powerful shortcode functionality. These shortcodes allow you to create custom event lists that can show past events by default, mix past and future events, or filter events based on other specific criteria. This is the most flexible solution but requires the premium add-on.
4. Custom Code for Advanced Control
For users comfortable with code, WordPress filters and actions provide the ultimate level of control. For instance, you can write a custom function to hide specific elements, like the "Add to Calendar" section, only on past events. The sample code below, added to your theme's functions.php file, demonstrates this by hiding the .tribe-events-cal-links section for events that have already ended.
/* Remove Add to Calendar from past events */
function hide_add_to_calendar_for_past_events() {
if ( ! function_exists( 'tribe_get_end_date' ) ) {
return; // Bail if The Events Calendar function is not available
}
// Check if we are on a single event page
if ( tribe_is_event() && is_single() ) {
$event_id = get_the_ID();
$event_end_date = tribe_get_end_date( $event_id, false, 'Y-m-d H:i:s' );
// If the event has passed, add a CSS rule to hide the 'Add to Calendar' area
if ( current_time( 'Y-m-d H:i:s' ) > $event_end_date ) {
echo '<style>
.tribe-events-cal-links {
display: none;
}
</style>';
}
}
}
add_action( 'wp_head', 'hide_add_to_calendar_for_past_events' );
Important Note: Always use a child theme when adding custom code to avoid losing your changes during theme updates. Incorrect code can break your site, so proceed with caution and always test on a staging site first.
Troubleshooting Third-Party Integrations
Many issues with event display, particularly when using page builders like Elementor, stem from third-party widgets and add-ons. If you are using an "Events Calendar" widget from Essential Addons, Happy Addons, or another third-party plugin, and past events are not showing, you must contact the support team for that specific add-on. The Events Calendar's core plugin cannot control how these external tools query and display events.
Conclusion
Understanding the default behavior of The Events Calendar is the first step to managing your past events effectively. Whether you choose to disable the past events view, use navigation, leverage shortcodes, or write custom code, you have several options to make the plugin work for your specific website needs.
Related Support Threads Support
-
Remove Add to Calendar section from past eventshttps://wordpress.org/support/topic/remove-add-to-calendar-section-from-past-events/
-
Version [6.7.1] show old events instead of recently completedhttps://wordpress.org/support/topic/version-6-7-1-show-old-events-instead-of-recently-completed/
-
Events that are scheduled do not appearhttps://wordpress.org/support/topic/events-that-are-scheduled-do-not-appear/
-
Show Past Events ?https://wordpress.org/support/topic/show-past-events-10/
-
Events get removed from my iCal calendarhttps://wordpress.org/support/topic/events-get-removed-from-my-ical-calendar/
-
Deactivating the display of the number of reservationshttps://wordpress.org/support/topic/deactivating-the-display-of-the-number-of-reservations/
-
Show past events connected to blog News by ACF Relationshiphttps://wordpress.org/support/topic/show-past-events-connected-to-blog-news-by-acf-relationship/
-
I don’t want my past events to disappear from the events list on homepage.https://wordpress.org/support/topic/i-dont-want-my-past-events-to-disappear-from-the-events-list-on-homepage/
-
Past eventshttps://wordpress.org/support/topic/past-events-29/
-
How to publish on the pagehttps://wordpress.org/support/topic/how-to-publish-on-the-page/
-
How to show Past Events ?https://wordpress.org/support/topic/how-to-show-past-events-4/
-
Calendar doesn’t show past eventshttps://wordpress.org/support/topic/calendar-doesnt-show-past-events/
-
Persistent Events for Festival Pagehttps://wordpress.org/support/topic/persistent-events-for-festival-page/
-
what am i missing ?https://wordpress.org/support/topic/what-am-i-missing-28/