<div class="card-middle grid-60 tablet-grid-65 mobile-grid-100">

          <?php 
        the_title('<p class="card-title">', '</p>');
        ?>

           <p class="card-time">

            <?php 
        $event_time_output = $event_start_month . ' ' . $event_start_day . ', ' . $event_start_year . ' | <em>' . $event_start_time . '</em>';
        // Begin building the event time using the starting day, month, year
        /* If there is end date details, do stuff */
        if ($event_show_end == 'yes') {
            $event_end_date = get_field('event_end_date');
            // Get the end date
            $event_end_dates = makeDates($event_end_date);
            // Break end date into parts
            $event_end_day = $event_end_dates['day'];
            // Get the end day
            $event_end_month = $event_end_dates['month'];
            // Get the end month
            $event_end_year = $event_end_dates['year'];
            // Get the end year
            $event_end_time = get_field('event_end_time');
            // Get the end time
            $event_time_output .= ' - ';
            // Begin adding to the event time output
            /* If the end date is not equal to the start date, output the end month, day, and year */
            if ($event_end_date != $event_start_date) {
                $event_time_output .= $event_end_month . ' ' . $event_end_day . ', ' . $event_end_year . ' | ';
            }
Example #2
0
    </div>

    <?php 
}
?>

    <?php 
if (get_the_content()) {
    ?>

    <div class="article-content">

    <?php 
    /* For all post types that aren't events, get the post date and output the month and year */
    if (get_post_type() != 'events') {
        $post_date = makeDates(get_the_date('Ymd'));
        ?>

    <div class="published-date">
      <div class="published-date_month"><?php 
        echo $post_date['month'];
        ?>
</div>
      <div class="published-date_year"><?php 
        echo $post_date['year'];
        ?>
</div>
    </div>

    <?php 
    }