Skip to content

Instantly share code, notes, and snippets.

@JudeRosario
Created October 13, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JudeRosario/437fde632a733810bf93 to your computer and use it in GitHub Desktop.
Save JudeRosario/437fde632a733810bf93 to your computer and use it in GitHub Desktop.
Events Archive.php
<section class="eab-events-archive <?php esc_attr_e($args['class']); ?>">
<?php foreach ($events as $event) { ?>
<?php $event = $event instanceof Eab_EventModel ? $event : new Eab_EventModel($event); ?>
<article class="eab-event <?php echo eab_call_template('get_status_class', $event); ?>" id="eab-event-<?php echo $event->get_id(); ?>">
<h4><?php echo $event->get_title(); ?></h4>
<div class="eab-event-body">
<?php echo eab_call_template('get_archive_content', $event);
$rawthumbsrc = wp_get_attachment_image_src(get_post_thumbnail_id($event->get_id()));
$eventthumb = $rawthumbsrc ? @$rawthumbsrc[0] : false; ?>
<img class="alignleft img-thumbnail" src=" <?php echo $eventthumb ?> ">
</div>
</article>
<?php } ?>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment