Created
August 6, 2018 17:40
-
-
Save j-mccarthy/1947b345369b3c2697f3ed57c1917ed4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template section where the event posts are displayed. | |
*/ | |
?> | |
<aside class="events--filter"> | |
<?php echo facetwp_display( 'facet', 'audience' ); ?> | |
</aside> | |
<div class="events--card-view facetwp-template"> | |
<?php foreach ( get_all_events() as $event ) : ?> | |
<article class="item-content"> | |
<a href="<?php echo the_permalink( $event['post_object']->ID ); ?>"> | |
<header class="item-content--header"> | |
<h3><?php echo $event['post_object']->post_title; ?></h3> | |
</header> | |
<div class="item-content--main"> | |
<div class="item-content--detail"> | |
<?php echo cpen_display_svg( array( | |
'icon' => 'ios-calendar', | |
'title' => 'Event date', | |
'desc' => '...', | |
'fill' => '#929292', | |
'height' => '14', | |
'width' => '14', | |
) ); ?> | |
<span><?php echo date( 'jS M Y', strtotime( str_replace( '-','/', $event['start_time'] ) ) ); ?></span> | |
</div> | |
<div class="item-content--detail"> | |
<?php echo cpen_display_svg( array( | |
'icon' => 'simple-clock', | |
'title' => 'Start time', | |
'desc' => '...', | |
'fill' => '#929292', | |
'height' => '14', | |
'width' => '14', | |
) ); ?> | |
<span><?php echo date( 'H i a', strtotime( $event['start_time'] ) ); ?></span> | |
</div> | |
<div class="item-content--detail"> | |
<?php echo cpen_display_svg( array( | |
'icon' => 'ios-pin', | |
'title' => 'Location', | |
'desc' => '...', | |
'fill' => '#929292', | |
'height' => '14', | |
'width' => '14', | |
) ); ?> | |
<span><?php echo $event['location']; ?></span> | |
</div> | |
<div class="item-content--detail"> | |
<span class="link">Go to event detail</span> | |
</div> | |
</div> | |
</a> | |
</article> | |
<?php endforeach; ?> | |
</div> | |
<?php echo facetwp_display( 'pager' ); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment