-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-events.php
113 lines (69 loc) · 2.21 KB
/
archive-events.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php get_header(); ?>
<div class="band mt-50">
<div class="container">
<div class="row">
<div class="col-sm-12">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="kitchen-sink mb-50" role="article">
<div>
<?php
if(get_field('event_date',$post->ID)){
?>
<a class="feed_date" href="<?php the_permalink();?>">
<?php
if(get_field('event_start_date', $post->ID )){
$eventDateStart = DateTime::createFromFormat('Ymd', get_field('event_start_date', $post->ID ));
echo $eventFormatEndMonth = $eventDateStart->format('m');
echo '|';
echo $eventFormatEndNumber = $eventDateStart->format('j');
echo ' - ';
}
?>
<?php
if(get_field('event_date', $post->ID )){
$eventDateEnd = DateTime::createFromFormat('Ymd', get_field('event_date', $post->ID ));
echo $eventFormatEndMonth = $eventDateEnd->format('m');
echo '|';
echo $eventFormatEndNumber = $eventDateEnd->format('j');
}
?>
</a>
<?php
}
?>
</div>
<?php
if( get_field( 'location' ) ){
?>
<h5><em>Map Available</em></h5>
<?php
}
?>
<h1>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h1>
<?php
if(get_field('excerpt')){
echo preg_replace('~\s?<p>(\s| )+</p>\s?~', '', get_field('excerpt'));
}
?>
<a class="btn-primary" href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">Learn More</a>
</article> <!-- end article -->
<hr/>
<?php
endwhile;
else:
endif;
?>
<?php
if (function_exists('wp_bootstrap_page_navi')) {
wp_bootstrap_page_navi();
}
?>
</div><!-- .col -->
</div><!-- .row -->
</div><!-- .container -->
</div><!-- #blog_content -->
<?php get_footer(); ?>