$event_meta = XiEventmeta::clean_meta(get_post_meta($event->ID)); // Just a way of doing a makeshift loop $post = get_post($event->ID); setup_postdata($post); $excerpt = wp_trim_words(get_the_content(), 25, ' <a href=' . $event->permalink . '>...read more.</a>'); ?> <div class="xi_list_event"> <h2><a href="<?php echo $event->permalink; ?> "><?php echo $event->title; ?> </a></h2> <h3><?php echo XiEventmeta::render_event_time($event->ID, $event_meta, $event->start_timestamp, $event->end_timestamp); ?> </h3> <p> <?php echo $excerpt; ?> </p> </div> <?php wp_reset_postdata(); } ?> <div class='xi-pagination'> <p> <a href="#">pagination: todo</a>
// Template to render out the event details shortcode. Used by the core plugin for the single event view. global $xi_event_id, $xi_event_meta, $xi_shortcode_attributes; ?> <div class="xi_event-meta"> <?php /* ?> If you want to see the contents of the available event meta, display this: <pre style="font-size: 11px; line-height: 11px; max-height: 300px; overflow-y: auto;"> <?php print_r($xi_event_meta); ?> </pre> */ ?> <h2 class="xi_event-details-heading">Event Details</h2> <p class="xi_event-details"> <strong>Time:</strong> <?php echo XiEventmeta::render_event_time($xi_event_id, $xi_event_meta); ?> <?php $categories = wp_get_post_terms($xi_event_id, XiEvents::$category_taxonomy_name); if (!empty($categories)) { ?> <br /><strong><?php echo _n('Category', 'Categories', count($categories)); ?> :</strong> <?php foreach ($categories as $category) { ?> <a href="<?php echo get_term_link($category); ?>