• Resolved jeremi_liwanag

    (@jeremi_liwanag)


    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

    http://wordpress.org/plugins/events-manager/

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

    (@angelo_nwl)

    hi,

    try something like this

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

    (@jeremi_liwanag)

    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.

    Thanks!

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

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