forked from poole/lanyon
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.php
39 lines (33 loc) · 876 Bytes
/
index.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
<?php get_header(); ?>
<div class="posts">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post">
<h1 class="post-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h1>
<span class="post-date"><?php the_date(); ?></span>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php else: ?>
<?php endif; ?>
</div>
<div class="pagination">
<?php
$older = get_previous_posts_link( 'Older' );
$newer = get_next_posts_link( 'Newer');
?>
<?php if ( $older ) : ?>
<?php echo $older ?>
<?php else : ?>
<span class="pagination-item older">Older</span>
<?php endif; ?>
<?php if ( $newer ) : ?>
<?php echo $newer; ?>
<?php else : ?>
<span class="pagination-item newer">Newer</span>
<?php endif; ?>
</div>
<?php get_footer(); ?>