Hi there,
Can I get some assistance sorting out an issue with the ordering of events on an upcoming events module?
Currently the events show in what appears to be the publish date and not the event date. Also past events are showing.
The events feed is showing the actual event date but just posting in the order of the published date.
This is the code:
<?php
extract(array(
'events' => []
), EXTR_SKIP);
$heading = (($heading) ? $heading : 'Member Events');
?>
<div class="col-xxs-12 col-xs-6 col-md-3 isotope-item">
<div class="panel panel-default module module-member-event">
<div class="panel-heading">
<a class="btn btn-default btn-sm pull-right" href="/event-listings">See All</a>
<h3 class="panel-title"><?php echo $heading; ?></h3>
</div>
<div class="list-group" data-compare>
<?php $args = array( 'orderby' => 'date'); foreach($events as $event ): ?>
<a href="<?php echo $event['url']; ?>" class="list-group-item">
<?php render_template('subtitle-with-date', array('text' => $event['title'], 'date' => $event['date'])); ?>
</a>
<?php endforeach; ?>
</div>
</div>
</div>
I recieved this info from you guys before but I just can’t seem to make anything work:
'meta_key' => '_EventStartDate',
'orderby' => array('menu_order' => 'ASC','meta_value_datetime' => 'ASC',)