Hey Erwinnet,
Yes this is possible with a bit of PHP code. For others looking for help with this, there is a blog post on how you can add customizations to different parts of The Events Calendar here: https://roundupwp.com/customize-events-calendar-single-event-templates/
For your specific use, you would want to add this code in your functions.php file for your theme. Be very careful when adding this as a mistake can cause your site to crash:
Here is the PHP code that will add the notice:
function rtec_custom_registration_count_display() {
// Only run this code if Registrations for the Events Calendar is active
if ( function_exists( 'rtec_get_event_meta' ) ) {
$event_id = get_the_ID();
// Get information about this event related to registrations
$event_meta = rtec_get_event_meta( $event_id );
// If this event has limited seats
if ( $event_meta['limit_registrations'] ) {
// Calculate the number of seats remaining and display a note
$registrations_remaining = $event_meta['max_registrations'] - $event_meta['num_registered'];
if ( $registrations_remaining < 1 ) {
echo '<div class="tribe-events-event-cost rtec-custom-limit rtec-green"><span>Full</span></div>';
} elseif ( $event_meta['num_registered'] > 0 ) {
echo '<div class="tribe-events-event-cost rtec-custom-limit rtec-red"><span>' . $event_meta['num_registered'] . ' volunteering</span></div>';
}
}
}
}
add_action( 'tribe_events_before_the_meta', 'rtec_custom_registration_count_display' );
You will also need to add this CSS to the “Custom CSS” area on the “Form” tab:
.tribe-events-event-cost.rtec-custom-limit {
float: none !important;
display: inline-block;
margin: 0 0 5px !important;
}
.tribe-events-list .tribe-events-event-cost.rtec-custom-limit.rtec-red span {
background: #FDA7AD;
border-color: #FC8089;
}
.tribe-events-list .tribe-events-event-cost.rtec-custom-limit.rtec-green span {
background: #C8F6F1;
border-color: #68CDC2;
}
Let me know if you have more questions!
– Craig