forked from xb2016/kratos-pjax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.php
58 lines (58 loc) · 3.42 KB
/
content.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
<article class="kratos-hentry clearfix">
<?php if(kratos_option('list_layout')=='old_layout'){ ?>
<div class="kratos-entry-thumb">
<?php kratos_blog_thumbnail() ?>
</div>
<div class="kratos-post-inner">
<header class="kratos-entry-header clearfix">
<h2 class="kratos-entry-title"><a href="<?php the_permalink() ?>"><?php the_title() ?></a><?php if(is_sticky()) echo "—置顶"; ?></h2>
<div class="kratos-post-meta">
<span class="pull-left">
<a href="#"><i class="fa fa-calendar"></i> <?php echo get_the_date(); ?></a>
</span>
<span class="visible-lg visible-md visible-sm pull-left">
<?php $category=get_the_category();echo '<a href="'.get_category_link($category[0]->term_id).'"><i class="fa fa-folder-open-o"></i> '.$category[0]->cat_name.'</a>'; ?>
<a href="<?php the_permalink() ?>#respond"><i class="fa fa-commenting-o"></i> <?php comments_number('0','1','%'); ?>条评论</a>
</span>
<span class="pull-left">
<a href="<?php the_permalink() ?>"><i class="fa fa-eye"></i> <?php echo kratos_get_post_views(); ?>次阅读</a>
<a href="<?php the_permalink() ?>"><i class="fa fa-thumbs-o-up"></i> <?php if(get_post_meta($post->ID,'love',true)) echo get_post_meta($post->ID,'love',true); else echo '0'; ?>人点赞</a>
</span>
</div>
</header>
<div class="kratos-entry-content clearfix">
<p><?php echo wp_trim_words(get_the_excerpt(), 110); ?></p>
</div>
</div>
<?php }else{ ?>
<div class="kratos-entry-border-new clearfix">
<?php if(is_sticky()) echo '<img class="stickyimg" src="'.get_bloginfo('template_directory').'/images/sticky.png"/>'; ?>
<div class="kratos-entry-thumb-new">
<?php kratos_blog_thumbnail_new() ?>
</div>
<div class="kratos-post-inner-new">
<header class="kratos-entry-header-new">
<a class="label" href="<?php $category=get_the_category();echo get_category_link($category[0]->term_id).'">'.$category[0]->cat_name; ?><i class="label-arrow"></i></a>
<h2 class="kratos-entry-title-new"><a href="<?php the_permalink() ?>"><?php the_title() ?></a><?php if(is_sticky()) echo "—置顶"; ?></h2>
</header>
<div class="kratos-entry-content-new">
<p><?php echo wp_trim_words(get_the_excerpt(),110); ?></p>
</div>
</div>
<div class="kratos-post-meta-new">
<span class="pull-left">
<a href="<?php the_permalink() ?>"><i class="fa fa-calendar"></i> <?php echo get_the_date(); ?></a>
<a href="<?php the_permalink() ?>#respond"><i class="fa fa-commenting-o"></i> <?php comments_number('0','1','%'); ?>条评论</a>
</span>
<span class="visible-lg visible-md visible-sm pull-left">
<a href="<?php the_permalink() ?>"><i class="fa fa-eye"></i> <?php echo kratos_get_post_views(); ?>次阅读</a>
<a href="<?php the_permalink() ?>"><i class="fa fa-thumbs-o-up"></i> <?php if(get_post_meta($post->ID,'love',true)) echo get_post_meta($post->ID,'love',true); else echo '0'; ?>人点赞</a>
<a href="<?php the_permalink() ?>"><i class="fa fa-user"></i> <?php the_author(); ?></a>
</span>
<span class="pull-right">
<a class="read-more" href="<?php the_permalink() ?>" title="阅读全文">阅读全文 <i class="fa fa-chevron-circle-right"></i></a>
</span>
</div>
</div>
<?php } ?>
</article>