0){
$args_search_qqq = array (
'post_type' => array( 'mep_events' ),
'paged' => $paged,
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '>'
)
),
'tax_query' => array(
array(
'taxonomy' => 'mep_cat',
'field' => 'term_id',
'terms' => $cat
)
)
);
}
elseif($org>0){
$args_search_qqq = array (
'post_type' => array( 'mep_events' ),
'posts_per_page' => $show,
'paged' => $paged,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '>'
)
),
'tax_query' => array(
array(
'taxonomy' => 'mep_org',
'field' => 'term_id',
'terms' => $org
)
)
);
}
else{
$args_search_qqq = array (
'post_type' => array( 'mep_events' ),
'paged' => $paged,
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '>'
)
)
);
}
$loop = new WP_Query( $args_search_qqq );
while ($loop->have_posts()) {
$loop->the_post();
$event_meta = get_post_custom(get_the_id());
$author_terms = get_the_terms(get_the_id(), 'mep_org');
$time = strtotime($event_meta['mep_event_start_date'][0]);
$newformat = date('Y-m-d H:i:s',$time);
//if(time() < strtotime($newformat)){
$tt = get_the_terms( get_the_id(), 'mep_cat');
$torg = get_the_terms( get_the_id(), 'mep_org');
// print_r($tt);
?>
$paged,
"total"=>$loop->max_num_pages
);
echo "";
?>