Sorting events in theme
-
Hello,
I am trying to sort events by ASC order, here is the code that came with the template:
<li id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>><?php
$et_event_date = get_post_meta( get_the_ID(), '_et_event_date', true );
$et_event_location = get_post_meta( get_the_ID(), '_et_event_location', true );
if ( '' != $et_event_date ) : ?>
<div class="show-date">
<span class="post-meta"><?php echo date_i18n( _x( 'M', 'Harmony' ), $et_event_date ); ?><span><?php echo date( _x( 'd', 'Event day format', 'Harmony' ), $et_event_date ); ?></span></span>
</div>
<?php endif; ?>
<div class="event-title-area">
<h2>"><?php the_title(); ?></h2><?php if ( '' != $et_event_location ) : ?>
<p><?php echo esc_html( $et_event_location ); ?></p>
<?php endif; ?>
</div> <!-- .event-title-area -->" class="more"><?php esc_html_e( 'Event Info', 'Harmony' ); ?>
<!-- end .post-->Would appreciate it if anyone could send me a quick fix
Thanks
- The topic ‘Sorting events in theme’ is closed to new replies.