53 lines
1.7 KiB
PHP
53 lines
1.7 KiB
PHP
|
<?php
|
||
|
get_header();
|
||
|
the_post();
|
||
|
$term_id = get_queried_object()->term_id;
|
||
|
// print_r(get_queried_object());
|
||
|
?>
|
||
|
|
||
|
<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();
|
||
|
$event_meta = get_post_meta(get_the_id(),'mep_event_meta',true);
|
||
|
$time = strtotime($event_meta['event_start_date']);
|
||
|
$newformat = date('Y-m-d H:i:s',$time);
|
||
|
|
||
|
|
||
|
if(time() < strtotime($newformat)){
|
||
|
|
||
|
?>
|
||
|
<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>
|
||
|
<h3 class='mep_list_date'>on <?php echo $event_meta['event_start_date']; ?> - <?php echo $event_meta['event_end_date']; ?></h3>
|
||
|
<p><?php echo $event_meta['event_venue']; ?>,<?php echo $event_meta['event_street']; ?>, <?php echo $event_meta['event_city']; ?>,<?php echo $event_meta['event_state']; ?>,<?php echo $event_meta['event_postcode']; ?>,<?php echo $event_meta['event_country']; ?></p>
|
||
|
</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<?php
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</div>
|
||
|
<?php
|
||
|
get_footer();
|
||
|
?>
|