Show Dates From and To
-
Hi, i’m using a custom query for my Events. It shows the latest events that was created, works like a normal post..
<?php $mcc_query = new WP_Query( array( 'post_type' => 'event' ) ); while($mcc_query->have_posts()) : $mcc_query->the_post(); ?> <?php $event = new EM_Event($post->ID); ?> <div class="main-news-cont"> <div class="event-posts"> <div class="upcoming-date-cont fl"> <div class="upcoming-d"><?php echo get_the_date('d'); ?></div> <div class="upcoming-m-y"><?php echo get_the_date('M Y'); ?></div> </div> <div class="news-title"><a href="<?php the_permalink(); ?> "> <?php the_title( '<h2>', '</h2>' ); ?> </a></div> <div class="events-time-loc"> <?php $evt = em_get_events( array( 'post_id' => $ID ) ); ?> <div class="events-time"> <span>Time</span>: <?php echo $event->output('#_12HSTARTTIME'); ?> to <?php echo $event->output('#_12HENDTIME'); ?> </div> <div class="events-loc"> <span>Location:</span> <?php echo do_shortcode('[locations_list]'); ?> </div>
I’m wondering since i’m using my own template. How can show the start and end time of the event??
Here’s what i have tried.. sadly it doesnt work.
<div class="events-time"> <span>Time</span>: <?php echo $event->output('#_12HSTARTTIME'); ?> to <?php echo $event->output('#_12HENDTIME'); ?> </div>
thanks a lot
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Show Dates From and To’ is closed to new replies.