Support » Plugins and Hacks » Events Manager » [Resolved] Show Dates From and To

[Resolved] 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 class="news-title"><a href="<?php the_permalink(); ?> ">
                  <?php the_title( '<h2>', '</h2>' ); ?>
                <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 class="events-loc">
                	<span>Location:</span> <?php echo do_shortcode('[locations_list]'); ?>

    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'); ?>

    thanks a lot


Viewing 2 replies - 1 through 2 (of 2 total)
  • angelo_nwl


    NetWebLogic Support


    try something like this

    $EM_Event = em_get_event($post->ID, 'post_id');
    echo $EM_Event->output( get_option('dbem_single_event_format') );

    Hi!! Unfortunately It gave me Date/Time/Categories and a Map. Also the information that’s being outputted is wrong .. I’m getting 12:00am and 1970’s.

    I just want the start and end time.


    [ Please do not bump, that’s not permitted here. ]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Show Dates From and To’ is closed to new replies.
Skip to toolbar