with the shortcode http://wp-event-organiser.com/documentation/shortcodes/event-list-shortcode/ [eo_events] I can show all my future events. But i don’t want to show the events that are fully booked ( Cap booking)
Is it possible to hide them?
thanks
http://www.bijlouise.nl
Marnix Bras
Hi Marnix,
The easiest way to hide them is to edit the event list shortcode/widget template file (http://docs.wp-event-organiser.com/theme-integration/how-do-i-customise-the-templates/) with the following (just after the while loop):
<?php while( $eo_event_loop->have_posts() ): $eo_event_loop->the_post(); ?>
<?php
global $post;
$event_id = $post->ID;
$occurrence_id = $post->occurrence_id; //If selling by date
$remaining = eo_get_remaining_tickets_count( $event_id, $occurrence_id );
if( !$remaining ){
continue;
}
?>
...
This however presents obvious problems if you want to show some definiate number of available (bookable) events. There is currently no shortcode attribute available to exclude events that are fully booked. (I’ll be looking into this – but doing can be complicated, particularly when selling tickets by date. I think a meta data ‘flag’ may be the best way of achieving this).
Stephen Harris