• Resolved omegacoder

    (@omegacoder)


    I need to display an events date in events detail page, but this will go in the php page file, and not in the settings tab of the events manager plugin. Does events manager have this capability?

    For example, I need to do something like this in my theme functions.php file:

    <div class=”event-date”>
    <abbr class=”event-date”>
    <?php ***CODE TO OUTPUT THE EVENT DATE HERE*** ?>
    </abbr>
    </div><!– .entry-date –>

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter omegacoder

    (@omegacoder)

    thanks very much. For everyones’ reference, I used the following to solve my issue:

    global $post;
    $EM_Event = em_get_event($post->ID, ‘post_id’);

    <div class=”entry-meta”>
    <span class=”entry-date”>
    <abbr class=”published” title=”<?php echo $EM_Event->output(‘#_EVENTNAME’); ?>”><?php echo $EM_Event->output(‘#F #j#S, #Y’); ?>
    </abbr>
    </span>
    </div><!– .entry-meta –>

    Thread Starter omegacoder

    (@omegacoder)

    oh and for events that span more than one day, I changed the above code to:

    <div class=”entry-meta”>
    <span class=”entry-date”>
    <abbr class=”published” title=”<?php echo $EM_Event->output(‘#_EVENTNAME’); ?>”><?php echo $EM_Event->output(‘#F #j#S, #Y #@_{ – F jS, Y}’); ?>
    </abbr>
    </span>
    </div><!– .entry-meta –>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to access an events date using php code’ is closed to new replies.