"0", "org" => "0", "style" => "grid", "column" => 2, "cat-filter" => "no", "org-filter" => "no", "show" => "-1", "pagination" => "no", 'sort' => 'ASC' ); $params = shortcode_atts($defaults, $atts); $cat = $params['cat']; $org = $params['org']; $style = $params['style']; $cat_f = $params['cat-filter']; $org_f = $params['org-filter']; $show = $params['show']; $pagination = $params['pagination']; $sort = $params['sort']; $column = $params['column']; $flex_column = $column; $mage_div_count = 0; $event_expire_on = mep_get_option('mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime'); ob_start(); ?>
'mep_cat' )); ?>
'mep_org' ) ); ?>
0) { $args_search_qqq = array( 'post_type' => array('mep_events'), 'paged' => $paged, 'posts_per_page' => $show, 'order' => $sort, 'orderby' => 'meta_value', 'meta_key' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, 'value' => $now, 'compare' => '>' ) ) ); } $loop = new WP_Query($args_search_qqq); $total_post=$loop->post_count; 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['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]); $newformat = date_i18n('Y-m-d H:i:s', $time); $tt = get_the_terms(get_the_id(), 'mep_cat'); $torg = get_the_terms(get_the_id(), 'mep_org'); $org_class = mep_get_term_as_class(get_the_id(), 'mep_org'); $cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat'); $available_seat = mep_get_total_available_seat(get_the_id(), $event_meta); if ($style == 'grid') { if ($column == 2) { $columnNumber = 'two_column'; } elseif ($column == 3) { $columnNumber = 'three_column'; } elseif ($column == 4) { $columnNumber = 'four_column'; } else { $columnNumber = 'two_column'; } } else { $columnNumber = 'one_column'; } ?> 0 && $style == 'grid' && $mage_div_count % $flex_column == 0) { echo '
'; } ?> 0 && $style == 'grid' && ($mage_div_count % $flex_column == 0 || $total_post == $mage_div_count)) { $blank_div = $flex_column - ($mage_div_count % $flex_column); if ($total_post == $mage_div_count && $blank_div > 0 && $flex_column > 1 && $blank_div < $flex_column) { while ($blank_div > 0) { echo '
'; $blank_div--; } } echo '
'; } } wp_reset_postdata(); //} if ($pagination == 'yes') { ?>
$paged, "total" => $loop->max_num_pages ); echo "
" . paginate_links($pargs) . "
"; ?>
"0", "org" => "0", "style" => "grid", "cat-filter" => "no", "org-filter" => "no", "show" => "-1", "pagination" => "no", 'sort' => 'DESC' ); $params = shortcode_atts($defaults, $atts); $cat = $params['cat']; $org = $params['org']; $style = $params['style']; $cat_f = $params['cat-filter']; $org_f = $params['org-filter']; $show = $params['show']; $pagination = $params['pagination']; $sort = $params['sort']; $event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime'); ob_start(); ?>
'mep_cat' )); ?>
'mep_org' )); ?>
0) { $args_search_qqq = array( 'post_type' => array('mep_events'), 'paged' => $paged, 'posts_per_page' => $show, 'order' => $sort, 'orderby' => 'meta_value', 'meta_key' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]); $newformat = date_i18n('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 "
" . paginate_links($pargs) . "
"; ?>
"0", "org" => "0", "style" => "grid", "cat-filter" => "no", "org-filter" => "no", "show" => "-1", "pagination" => "no", 'sort' => 'ASC' ); $params = shortcode_atts($defaults, $atts); $cat = $params['cat']; $org = $params['org']; $style = $params['style']; $cat_f = $params['cat-filter']; $org_f = $params['org-filter']; $show = $params['show']; $pagination = $params['pagination']; $sort = $params['sort']; $event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime'); ob_start(); do_action('woocommerce_before_single_product'); ?>
'mep_cat' )); ?>
'mep_org' )); ?>
0) { $args_search_qqq = array( 'post_type' => array('mep_events'), 'paged' => $paged, 'posts_per_page' => $show, 'order' => $sort, 'orderby' => 'meta_value', 'meta_key' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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' => 'event_start_datetime', 'meta_query' => array( array( 'key' => $event_expire_on, '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'); $start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]; $time = strtotime($start_datetime); $newformat = date_i18n('Y-m-d H:i:s', $time); $tt = get_the_terms(get_the_id(), 'mep_cat'); $torg = get_the_terms(get_the_id(), 'mep_org'); $org_class = mep_get_term_as_class(get_the_id(), 'mep_org'); $cat_class = mep_get_term_as_class(get_the_id(), 'mep_cat'); $available_seat = mep_get_total_available_seat(get_the_id(), $event_meta); ?>
'>

'; do_action('mep_add_to_cart_list'); echo '
'; ?>
$paged, "total" => $loop->max_num_pages ); echo "
" . paginate_links($pargs) . "
"; ?>