-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfront-page.php
195 lines (182 loc) · 6.2 KB
/
front-page.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?php get_header(); ?>
<div class="body_content">
<?php
$homepageEvents = new WP_Query(array(
'posts_per_page' => 1,
'post_type' => 'news'
));
while($homepageEvents->have_posts()) {
$homepageEvents->the_post(); ?>
<header class="bg-primary py-5 mb-5">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-lg-12">
<h1 class="display-4 text-white mt-5 mb-2"><?php the_title(); ?></h1>
<p class="lead mb-5 text-white-50">
<?php if (has_excerpt()) {
the_excerpt();
} else {
echo wp_trim_words(get_the_content(),33);
} ?>
</p>
</div>
</div>
</div>
</header>
<?php } ?>
<div class="container">
<div class="row">
<?php
$homepageEvents = new WP_Query(array(
'posts_per_page' => 1,
'post_type' => 'post'
));
while($homepageEvents->have_posts()) {
$homepageEvents->the_post(); ?>
<div class="col-md-8 mb-5">
<h2><?php the_title(); ?></h2>
<hr>
<p>
<?php if (has_excerpt()) {
the_excerpt();
} else {
echo wp_trim_words(get_the_content(),37);
} ?>
</p>
<a class="btn btn-primary btn-lg" href="<?php the_permalink() ?>">Discover more <i class="fas fa-angle-double-right"></i></a>
</div>
<?php } ?>
<div class="col-md-4 mb-5">
<h2>Contact Us</h2>
<hr>
<address>
<strong>iDeviceUK C.I.C.</strong>
<br>Suite 4053, Chynoweth House,
<br>Trevissome Park, Truro,
<br>Cornwall, TR4 8UN
<br>
</address>
<address>
<abbr title="Phone">P:</abbr>
+44 (0)1206 645055
<br>
<abbr title="Email">E:</abbr>
<a href="mailto:info@leemiller.club">info@leemiller.club</a>
</address>
</div>
</div>
<!-- /.row -->
<div class="row">
<?php
$homepageEvents = new WP_Query(array(
'posts_per_page' => 6,
'post_type' => 'portfolio'
));
while($homepageEvents->have_posts()) {
$homepageEvents->the_post(); ?>
<div class="col-md-4 mb-5">
<div class="card h-100">
<span class="card-img-top"><?php the_post_thumbnail(); ?></span>
<div class="date_holder"><span class="day"><?php the_time('j'); ?></span><span class="month"><?php the_time('F'); ?></span></div>
<div class="card-body">
<h4 class="card-title"><?php the_title(); ?></h4>
<p class="card-text">
<?php if (has_excerpt()) {
the_excerpt();
} else {
echo wp_trim_words(get_the_content(),20);
} ?>
</p>
</div>
<div class="card-footer">
<a href="<?php the_permalink() ?>" class="btn btn-primary">Find Out More!</a>
</div>
</div>
</div>
<?php } ?>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<div class="container">
<div class="row">
<div class="col-md-12 mb-5">
<div class="card text-white bg-danger my-5 py-4 text-center">
<div class="card-body">
<p class="text-white m-0">Looking for professional advice, you've come to the right place, view our documentation section.</p>
</div>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<div class="container">
<div class="row">
<?php
$homepageEvents = new WP_Query(array(
'posts_per_page' => 4,
'post_type' => 'documents'
));
while($homepageEvents->have_posts()) {
$homepageEvents->the_post(); ?>
<div class="col-md-12 mb-5">
<div class="card mb-4">
<span class="card-img-top"><?php the_post_thumbnail(); ?></span>
<div class="date_holder"><span class="day"><?php the_time('j'); ?></span><span class="month"><?php the_time('F'); ?></span></div>
<div class="card-body">
<h2 class="card-title"><?php the_title(); ?></h2>
<p class="card-text">
<?php if (has_excerpt()) {
the_excerpt();
} else {
echo wp_trim_words(get_the_content(),40);
} ?>
</p>
<a href="<?php the_permalink() ?>" class="btn btn-primary">Read More <i class="fas fa-angle-right"></i></a>
</div>
<div class="card-footer text-muted">Posted by <?php echo get_the_author(); ?></a></div>
</div>
</div>
<?php } ?>
</div>
</div>
<section class="bg-dark py-5 mb-5">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-lg-12">
<h1 class="display-4 text-white mt-5 mb-2">Download Themes</h1>
<p class="lead mb-5 text-white-50">Grab some free stuff while you're here!</p>
<button type="button" class="btn btn-outline-light">View products</button>
</div>
</div>
</div>
</section>
<div class="container">
<div class="row">
<?php
$homepageEvents = new WP_Query(array(
'posts_per_page' => 3,
'post_type' => 'reviews'
));
while($homepageEvents->have_posts()) {
$homepageEvents->the_post(); ?>
<div class="col-md-4 mb-5">
<div class="card">
<div class="card-body text-center p-5">
<h3 class="display-4 text-info"><strong><?php the_title(); ?><strong></strong></strong></h3>
<p class="lead mb-2">
<?php if (has_excerpt()) {
the_excerpt();
} else {
echo wp_trim_words(get_the_content(),20);
} ?>
</p>
<a href="<?php the_permalink() ?>" class="btn btn-xs btn-round btn-lg btn-info bgd-gradient-blue btn-rised ml-md-4 mt-md-4">More <i class="fas fa-angle-double-right"></i></a>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php get_footer(); ?>