-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsingle.php
66 lines (57 loc) · 2.34 KB
/
single.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
<?php
/**
* The Template for displaying all single posts.
*
* @package dangopress
*/
get_header();?>
<?php if (have_posts()): while (have_posts()): the_post(); ?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>" itemscope itemtype="http://schema.org/Article">
<meta itemprop="headline" content="<?php the_title(); ?>" />
<meta itemprop="author" content="<?php the_author(); ?>" />
<meta itemprop="datePublished" content="<?php echo date('Y-m-d', get_the_time('U')); ?>" />
<div class="entry-content" itemprop="articleBody">
<?php the_content(); ?>
</div>
<div class="entry-copyright">
<p>
<i class="icon-info-circle"></i>
转载请注明转自: <a href="<?php echo esc_url(home_url()); ?>"><?php bloginfo('name'); ?></a>
, 本文固定链接:
<a rel="shortlink" href="<?php echo wp_get_shortlink(); ?>"><?php the_title(); ?></a>
</p>
</div>
</article>
<?php if (function_exists('yarpp_related')) yarpp_related(); ?>
<div class="entry-footer clearfix">
<div id="pagination">
<div class="prev alignleft">
<span class="icon-chevron-circle-left"></span>
<?php
$prev_post = get_previous_post();
if (!empty($prev_post)) { ?>
<a rel="prev" href="<?php echo get_permalink($prev_post->ID); ?>"><?php echo $prev_post->post_title; ?></a>
<?php
} else {
echo '<a href="javascript:void(0);">已经是最新一篇文章</a>';
}
?>
</div>
<div class="next alignright">
<span class="icon-chevron-circle-right"></span>
<?php
$next_post = get_next_post();
if (!empty($next_post)) { ?>
<a rel="prev" href="<?php echo get_permalink($next_post->ID); ?>"><?php echo $next_post->post_title; ?></a>
<?php
} else {
echo '<a href="javascript:void(0);">已经是最后一篇文章</a>';
}
?>
</div>
</div>
</div>
<?php endwhile; endif;
comments_template();
get_footer();
?>