-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-event.php
More file actions
45 lines (40 loc) · 1.52 KB
/
archive-event.php
File metadata and controls
45 lines (40 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
get_header();
?>
<div class="page-banner">
<div class="page-banner__bg-image" style="background-image: url(<?php echo get_theme_file_uri('/images/gradient.png') ?>);"></div>
<div class="page-banner__content container container--narrow">
<h1 class="page-banner__title">All Events</h1>
<div class="page-banner__intro">
<p>Here's what's going on.</p>
</div>
</div>
</div>
<!-- <div class="div"> Due to COVID-19, we are....etc. test.</div> -->
<div class="container container--narrow page-section">
<?php
while(have_posts()) {
the_post(); ?>
<div class="event-summary">
<a class="event-summary__date t-center" href="<?php the_permalink(); ?>">
<span class="event-summary__month"><?php
$eventDate = new DateTime(get_post_field('event_date'));
echo $eventDate->format('M')
?></span>
<span class="event-summary__day"><?php
$eventDate = new DateTime(get_post_field('event_date'));
echo $eventDate->format('d')
?></span>
</a>
<div class="event-summary__content">
<h5 class="event-summary__title headline headline--tiny"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
<p><?php echo wp_trim_words(get_the_content(), 18); ?> <a href="<?php the_permalink(); ?>" class="nu gray">Learn more</a></p>
</div>
</div>
<?php }
echo paginate_links();
?>
</div>
<?php
get_footer();
?>