0){ $loop = new WP_Query(array( 'post__in' => array($event_id), 'post_type' => 'mep_events', 'posts_per_page' => -1 )); while ($loop->have_posts()) { $loop->the_post(); $post_id = get_the_id(); $post = get_post($event_id); global $event_meta; $event_meta = get_post_custom($event_id); // $total_seat = mep_event_total_seat(get_the_id(),'total'); // $total_resv = mep_event_total_seat(get_the_id(),'resv'); // $total_sold = mep_ticket_sold(get_the_id()); // $total_left = $total_seat - ($total_sold + $total_resv); $total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($post_id, 'total'), $post_id); $total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($post_id, 'resv'), $post_id); $total_sold = mep_ticket_sold($post_id); $total_left = $total_seat - ($total_sold + $total_resv); $leftt = apply_filters('mep_event_total_seat_count', $total_left, $post_id); // $leftt = $total_left; ?>