-
Notifications
You must be signed in to change notification settings - Fork 1
/
post.php
47 lines (43 loc) · 1.52 KB
/
post.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
<div class='post'>
<div class='title'>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php if ('post' == get_post_type()): ?>
<div class='muted'>
<p>
Post by <?php the_author_posts_link(); ?> on
<a href="<?php echo get_day_link(get_the_time('Y'), get_the_time('m'), get_the_time('d')); ?>"><?php echo get_the_time('j F, Y'); ?></a>
</p>
</div>
<?php endif; ?>
</div>
</div>
<article>
<?php the_content(''); ?>
</article>
<div class='info'>
<?php if ('post' == get_post_type()): ?>
<a class="comments" href="<?php echo (is_home() ? the_permalink() : '' ).'#comments' ?>">
<?php echo get_comments_number(); ?>
</a>
<?php endif; ?>
<p class="categories"><?php the_category(', ') ?></p>
<p class="tags"><?php the_tags('', ', '); ?></p>
<?php if (!is_single()): if ($pos=strpos($post->post_content, '<!--more-->')): ?>
<div class='continue'>
<a href="<?php the_permalink(); ?>">Continue reading '<?php the_title(); ?>' ›</a>
</div>
<?php endif; else:
$prev_post = get_previous_post();
$next_post = get_next_post();
?>
<footer>
<ul class="pager">
<?php if (!empty($next_post)): ?>
<li><a href="<?php echo get_permalink($next_post->ID) ?>">‹ <?php echo $next_post->post_title ?></a></li>
<?php endif; if (!empty($prev_post)): ?>
<li><a href="<?php echo get_permalink($prev_post->ID) ?>"><?php echo $prev_post->post_title ?> ›</a></li>
<?php endif; ?>
</ul>
</footer>
<?php endif; ?>
</div>