event expire query issue fixed

This commit is contained in:
magepeopleteam 2018-11-13 06:00:24 +00:00
parent 9c13a2a2ef
commit 592c0d30d3
3 changed files with 80 additions and 24 deletions

View File

@ -12,9 +12,17 @@ function mep_event_calender($atts, $content=null){
jQuery(document).ready( function() {
const myEvents = [
<?php
$now = date('Y-m-d H:i:s');
$args_search_qqq = array (
'post_type' => array( 'mep_events' ),
'posts_per_page' => -1
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '>'
)
)
);
@ -30,7 +38,7 @@ const myEvents = [
$newformat = date('Y-m-d H:i:s',$time);
// echo $newformat;
if(time() < strtotime($newformat)){
// if(time() < strtotime($newformat)){
?>
{
start: '<?php echo date('Y-m-d H:i',strtotime($event_meta['mep_event_start_date'][0])); ?>',
@ -40,7 +48,7 @@ const myEvents = [
class: '',
color: '#000',
data: {}
},<?php //if ($i == $count) { echo "";}else{ echo ","; } ?><?php $i++; } } ?>]
},<?php //if ($i == $count) { echo "";}else{ echo ","; } ?><?php $i++; } ?>]
jQuery('.event-calendar').equinox({
events: myEvents
@ -94,7 +102,7 @@ $terms = get_terms( array(
) );
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All','mage-eventpress'); ?></button><?php
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
foreach ($terms as $_terms) {
?><button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
@ -110,7 +118,7 @@ $terms = get_terms( array(
) );
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All','mage-eventpress'); ?></button><?php
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
foreach ($terms as $_terms) {
?><button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
@ -124,6 +132,8 @@ foreach ($terms as $_terms) {
<?php
$now = date('Y-m-d H:i:s');
$paged = get_query_var("paged")?get_query_var("paged"):1;
if($cat>0){
$args_search_qqq = array (
@ -133,6 +143,13 @@ if($cat>0){
'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',
@ -150,7 +167,14 @@ elseif($org>0){
'paged' => $paged,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'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',
@ -168,7 +192,14 @@ elseif($org>0){
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date'
'meta_key' => 'mep_event_start_date',
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '>'
)
)
);
}
@ -182,7 +213,7 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
$newformat = date('Y-m-d H:i:s',$time);
if(time() < strtotime($newformat)){
//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);
@ -200,7 +231,7 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
<div class="mep_list_event_details"><a href="<?php the_permalink(); ?>">
<div class="mep-list-header">
<h2 class='mep_list_title'><?php the_title(); ?></h2>
<h3 class='mep_list_date'> <?php _e('Price Start from:','mage-eventpress'); ?> <?php echo mep_event_list_price(get_the_id()); ?><!-- <i class="fa fa-calendar"></i> <?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo $event_meta['mep_event_end_date'][0]; ?> --></h3>
<h3 class='mep_list_date'> Price Start from: <?php echo mep_event_list_price(get_the_id()); ?><!-- <i class="fa fa-calendar"></i> <?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo $event_meta['mep_event_end_date'][0]; ?> --></h3>
</div>
<?php
@ -216,21 +247,21 @@ if($style=='list'){
<li>
<div class="evl-ico"><i class="fa fa-university"></i> </div>
<div class="evl-cc">
<h5><?php _e('Organized By:','mage-eventpress'); ?></h5>
<h5>Organized By:</h5>
<h6><?php echo $author_terms[0]->name; ?></h6>
</div>
</li>
<li>
<div class="evl-ico"><i class="fa fa-map-marker"></i> </div>
<div class="evl-cc">
<h5><?php _e('Location:','mage-eventpress'); ?></h5>
<h5>Location:</h5>
<h6><?php echo $event_meta['mep_city'][0]; ?></h6>
</div>
</li>
<li>
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
<div class="evl-cc">
<h5><?php _e('Time:','mage-eventpress'); ?></h5>
<h5>Time:</h5>
<h6><?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo date('h:i A', strtotime($event_meta['mep_event_end_date'][0])); ?></h6>
</div>
</li>
@ -240,7 +271,7 @@ if($style=='list'){
</div>
<?php
}
}
//}
if($pagination=='yes'){
?>
@ -314,7 +345,7 @@ $terms = get_terms( array(
) );
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All','mage-eventpress'); ?></button><?php
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
foreach ($terms as $_terms) {
?><button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
@ -330,7 +361,7 @@ $terms = get_terms( array(
) );
?>
<div class="mep-event-cat-controls">
<button type="button" class="mep-cat-control" data-filter="all"><?php _e('All','mage-eventpress'); ?></button><?php
<button type="button" class="mep-cat-control" data-filter="all">All</button><?php
foreach ($terms as $_terms) {
?><button type="button" class="mep-cat-control" data-filter=".<?php echo $_terms->slug; ?>"><?php echo $_terms->name; ?></button><?php
}
@ -344,6 +375,7 @@ foreach ($terms as $_terms) {
<?php
$now = date('Y-m-d H:i:s');
$paged = get_query_var("paged")?get_query_var("paged"):1;
if($cat>0){
$args_search_qqq = array (
@ -353,6 +385,13 @@ if($cat>0){
'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',
@ -370,7 +409,14 @@ elseif($org>0){
'paged' => $paged,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date',
'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',
@ -388,7 +434,14 @@ elseif($org>0){
'posts_per_page' => $show,
'order' => $sort,
'orderby' => 'meta_value',
'meta_key' => 'mep_event_start_date'
'meta_key' => 'mep_event_start_date',
'meta_query' => array(
array(
'key' => 'mep_event_start_date',
'value' => $now,
'compare' => '<'
)
)
);
}
@ -402,7 +455,7 @@ $author_terms = get_the_terms(get_the_id(), 'mep_org');
$newformat = date('Y-m-d H:i:s',$time);
if(time() > strtotime($newformat)){
//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);
@ -436,21 +489,21 @@ if($style=='list'){
<li>
<div class="evl-ico"><i class="fa fa-university"></i> </div>
<div class="evl-cc">
<h5><?php _e('Organized By:','mage-eventpress'); ?></h5>
<h5>Organized By:</h5>
<h6><?php echo $author_terms[0]->name; ?></h6>
</div>
</li>
<li>
<div class="evl-ico"><i class="fa fa-map-marker"></i> </div>
<div class="evl-cc">
<h5><?php _e('Location:','mage-eventpress'); ?></h5>
<h5>Location:</h5>
<h6><?php echo $event_meta['mep_city'][0]; ?></h6>
</div>
</li>
<li>
<div class="evl-ico"><i class="fa fa-calendar"></i> </div>
<div class="evl-cc">
<h5><?php _e('Time:','mage-eventpress'); ?></h5>
<h5>Time:</h5>
<h6><?php echo date('h:i A', strtotime($event_meta['mep_event_start_date'][0])); ?> - <?php echo date('h:i A', strtotime($event_meta['mep_event_end_date'][0])); ?></h6>
</div>
</li>
@ -459,7 +512,7 @@ if($style=='list'){
</div>
</div>
<?php
}
//}
}
if($pagination=='yes'){
?>

View File

@ -237,4 +237,7 @@ You can display the event list on any page by using the ShortCode. Just use this
*Update Release, Sorting feture added into shortcode. 18 Sep 2018*
= 2.1.5 =
*Update Release, Fixed Google Calender Time issue fixed. 06 Nov 2018*
*Update Release, Fixed Google Calender Time issue fixed. 06 Nov 2018
*= 2.1.6 =
*Update Release, Event Expired Listing Query Issue has been fixed in this version.. 06 Nov 2018*

View File

@ -3,7 +3,7 @@
* Plugin Name: Woocommerce Events Manager
* Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople..
* Version: 2.1.5
* Version: 2.1.6
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress