Hey vinchoz,
You would need some custom PHP for this currently. I was able to create some though. You would put the following in your theme’s functions.php file to get it to work. Be careful as an error can crash your site:
function ru_custom_attendance_class() {
if ( ! function_exists( 'RTEC' ) ) {
return;
}
$event_meta = rtec_get_event_meta( get_the_ID() );
if ( $event_meta['registrations_left'] === 0 ) {
echo '<div class="ru-full">';
} else {
echo '<div class="ru-open">';
}
}
add_action( 'tribe_template_before_include:events/v2/list/event', 'ru_custom_attendance_class' );
add_action( 'tribe_template_before_include:events/v2/month/calendar-body/day/calendar-events/calendar-event', 'ru_custom_attendance_class' );
add_action( 'tribe_template_before_include:events/v2/month/mobile-events/mobile-day/mobile-event', 'ru_custom_attendance_class' );
function ru_custom_attendance_class_after() {
if ( ! function_exists( 'RTEC' ) ) {
return;
}
echo '</div>';
}
add_action( 'tribe_template_after_include:events/v2/list/event', 'ru_custom_attendance_class_after' );
add_action( 'tribe_template_after_include:events/v2/month/calendar-body/day/calendar-events/calendar-event', 'ru_custom_attendance_class_after' );
add_action( 'tribe_template_after_include:events/v2/month/mobile-events/mobile-day/mobile-event', 'ru_custom_attendance_class_after' );
This will add a wrapping “div” element with the class “ru-open” or “ru-full” if the registration limit is reached.
Let me know if you have more questions!
– Craig