forked from baomihuahua/lolimeow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle.php
92 lines (87 loc) · 5.93 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
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
<?php get_header(); ?>
<section class="section-profile-cover section-blog-cover section-shaped my-0 " <?php if( meowdata('banneron') ) {echo md_banner();} ?>>
<div class="shape shape-style-1 shape-primary alpha-4">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="separator separator-bottom separator-skew" >
<svg x="0" y="0" viewBox="0 0 2560 100" preserveAspectRatio="none">
<polygon class="fill-white" points="2560 0 2560 100 0 100"></polygon>
</svg>
</div>
</section>
<main class="meowblog">
<div class="main-container">
<div class="container">
<div class="row">
<div class="col-lg-10 col-md-10 ml-auto mr-auto"><?php while (have_posts()) : the_post(); ?><?php setPostViews(get_the_ID()); ?>
<div class="post-single">
<div class="entry-header single-entry-header">
<h2 class="entry-title wow swing animated"><?php the_title(); echo get_the_subtitle(); ?></h2>
<div class="post-meta author-box wow bounceInRight">
<div class="thw-autohr-bio-img">
<div class="thw-img-border">
<?php echo get_avatar(get_the_author_meta( 'user_email' ),60,'','',array('class'=>array('img-fluid'))); ?>
</div>
</div>
<div class="post-meta-content">
<span class="list-post-date"><i class="fa fa-calendar"></i> Post on <?php echo get_the_time('Y-m-d'); ?></span>
<span class="post-author"><i class="fa fa-user-circle"></i> <?php the_author(); ?></span>
<span class="post-author"><i class="fa fa-comments-o"></i> <a href="#comments"><?php echo get_comments_number('0', '1', '%') ?> Comments</a></span>
<span class="list-post-views"><i class="fa fa-street-view"></i> <?php echo getPostViews(get_the_ID()); ?></span>
<?php edit_post_link('['.__('<span>编辑仅作者可见</span>', 'meowdata').']'); ?>
</div>
</div>
</div>
<div class="entry-content wow bounceInLeft">
<?php the_content(); ?>
</div>
</div>
<div class="post-footer clearfix wow bounceInDown">
<div class="post-tags">
<div class="article-categories"><?php the_tags('','',''); ?></div>
</div>
</div>
<div class="thw-author-box author-box thw-sept wow rollIn">
<div class="thw-autohr-bio-img">
<div class="thw-img-border">
<?php echo get_avatar( get_the_author_meta( 'user_email' ), 80,'','',array('class'=>array('img-fluid'))); ?>
</div>
</div>
<div class="author-info">
<h4><?php the_author(); ?></h4>
<p><?php echo meowdata('authorinfo'); ?></p>
</div>
</div>
<?php $categories = get_the_category();$categoryIDS = array();foreach ($categories as $category) {
array_push($categoryIDS, $category->term_id);}$categoryIDS = implode(",", $categoryIDS);?>
<nav class="post-navigation thw-sept wow bounceInUp">
<div class="post-previous">
<?php if (get_next_post($categoryIDS)) { next_post_link('%link','<span><i class="fa fa-angle-left"></i> Previous Post</span><h4>%title</h4>',true);} else { echo '<span><i class="fa fa-angle-left"></i> Previous Post </span><h4>已是最新文章';} ?>
</div>
<div class="post-next">
<?php if (get_previous_post($categoryIDS)) { previous_post_link('%link','<span>Next Post <i class="fa fa-angle-right"></i></span> <h4>%title</h4>',true);}else { echo '<span>Next Post <i class="fa fa-angle-right"></i></span> <h4>已是最后文章</h4>';} ?>
</div>
</nav>
<?php endwhile; ?>
<?php comments_template('', true); ?>
</div>
</div>
</div>
</div>
</main>
<?php if( meowdata('post_related_s') ) {?>
<div class=" container">
<div class="row wow fadeInUp animated">
<div class="col-lg-12">
<h3 class="title-normal thw-sept text-center"><?php echo meowdata('related_title')?></h3> </div>
<?php if( meowdata('post_related_s') ) md_posts_related( meowdata('related_title'), meowdata('post_related_n'), (meowdata('post_related_model') ? meowdata('post_related_model') : 'thumb') ) ?>
</div>
</div>
<?php } ?>
<?php get_footer(); ?>