-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathposts.php
54 lines (52 loc) · 2.26 KB
/
posts.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
<?php theme_include('header') ?>
<section class="main" role="main">
<?php if (has_posts()): ?>
<?php posts() ?>
<article class="jumbotron jumbotron-featured">
<div class="col">
<h2 class="display-4">
<a href="<?= article_url() ?>"><?= article_title() ?></a>
</h2>
<p class="lead"><?= article_description() ?></p>
<p class="lead">
<a href="<?= article_url() ?>" class="link" title="<?= article_title() ?>">
Continue reading…
</a>
</p>
</div>
</article>
<?php if (posts_per_page() > 1): ?>
<div class="row row-featured">
<?php while (posts()): ?>
<article class="col col-featured">
<div class="card card-featured">
<div class="card-body">
<strong class="category"><?= article_category() ?></strong>
<h2><a href="<?= article_url() ?>"><?= article_title() ?></a></h2>
<div class="date">
<time datetime="<?= date(DATE_W3C, article_time()) ?>">
<?= date('j M', article_time()) ?>
</time>
</div>
<p class="card-text"><?= article_description() ?></p>
<a href="<?= article_url() ?>" title="<?= article_title() ?>">
Continue reading…
</a>
</div>
</div>
</article>
<?php endwhile ?>
</div>
<?php endif ?>
<?php if (has_pagination()): ?>
<nav class="pagination">
<?php echo posts_prev() ?>
<?php echo posts_next() ?>
</nav>
<?php endif ?>
<?php else: ?>
<h2 class="page-title">No posts yet!</h2>
<p class="lead">Looks like you have some writing to do!</p>
<?php endif ?>
</section>
<?php theme_include('footer') ?>