2018-02-05 02:05:26 -05:00
|
|
|
<?php
|
|
|
|
get_header();
|
|
|
|
the_post();
|
|
|
|
|
|
|
|
$term_id = get_queried_object()->term_id;
|
|
|
|
// print_r(get_queried_object());
|
|
|
|
?>
|
2018-02-22 07:09:34 -05:00
|
|
|
<div class="mep-events-wrapper">
|
2018-02-05 02:05:26 -05:00
|
|
|
<div class='mep_event_list'>
|
|
|
|
|
|
|
|
<div class="mep_cat-details">
|
|
|
|
<h1><?php echo get_queried_object()->name; ?></h1>
|
|
|
|
<p><?php echo get_queried_object()->description; ?></p>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
$args_search_qqq = array (
|
|
|
|
'post_type' => array( 'mep_events' ),
|
|
|
|
'posts_per_page' => -1,
|
|
|
|
'tax_query' => array(
|
|
|
|
array(
|
|
|
|
'taxonomy' => 'mep_org',
|
|
|
|
'field' => 'term_id',
|
|
|
|
'terms' => $term_id
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
$loop = new WP_Query( $args_search_qqq );
|
|
|
|
while ($loop->have_posts()) {
|
|
|
|
$loop->the_post();
|
2018-02-05 07:19:54 -05:00
|
|
|
$event_meta = get_post_custom(get_the_id());
|
2019-12-10 02:51:49 -05:00
|
|
|
$time = strtotime($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
|
2018-02-05 02:05:26 -05:00
|
|
|
$newformat = date('Y-m-d H:i:s',$time);
|
|
|
|
|
|
|
|
|
|
|
|
if(time() < strtotime($newformat)){
|
2020-01-02 07:10:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
$start_datetime = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
|
|
|
$start_date = $event_meta['event_start_date'][0];
|
|
|
|
$start_time = $event_meta['event_start_time'][0];
|
|
|
|
|
|
|
|
$end_datetime = $event_meta['event_end_date'][0].' '.$event_meta['event_end_time'][0];
|
|
|
|
|
|
|
|
$end_date = $event_meta['event_end_date'][0];
|
|
|
|
$end_time = $event_meta['event_end_time'][0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-05 02:05:26 -05:00
|
|
|
|
|
|
|
?>
|
|
|
|
<div class='mep_event_list_item'>
|
|
|
|
<div class="mep_list_thumb"><?php the_post_thumbnail('medium'); ?></div>
|
|
|
|
<div class="mep_list_event_details"><a href="<?php the_permalink(); ?>">
|
|
|
|
<h2 class='mep_list_title'><?php the_title(); ?></h2>
|
2020-01-02 07:10:06 -05:00
|
|
|
<h3 class='mep_list_date'>on <?php echo get_mep_datetime($start_datetime,'date-text').' '.get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></h3>
|
2018-02-05 07:19:54 -05:00
|
|
|
|
|
|
|
<p><?php echo $event_meta['mep_location_venue'][0]; ?>,<?php echo $event_meta['mep_street'][0]; ?>, <?php echo $event_meta['mep_city'][0]; ?>,<?php echo $event_meta['mep_state'][0]; ?>,<?php echo $event_meta['mep_postcode'][0]; ?>,<?php echo $event_meta['mep_country'][0]; ?></p>
|
2018-02-05 02:05:26 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
2018-02-22 07:09:34 -05:00
|
|
|
</div>
|
2018-02-05 02:05:26 -05:00
|
|
|
<?php
|
|
|
|
get_footer();
|
|
|
|
?>
|