This repository has been archived by the owner on Mar 19, 2020. It is now read-only.
forked from seatonjiang/kratos
-
Notifications
You must be signed in to change notification settings - Fork 3
/
page-home.php
127 lines (127 loc) · 4.91 KB
/
page-home.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php
/*
Template Name: 首页模版
*/
get_header(); ?>
<div class="kratos-start">
<div class="kratos-overlay"></div>
<div class="kratos-cover kratos-topimg text-center" style="background-image: url(<?php echo kratos_option('krsort_hm_img'); ?>)">
<div class="desc animate-box">
<h2><?php echo kratos_option('krsort_hm_tx1'); ?></h2>
<span><?php echo kratos_option('krsort_hm_tx2'); ?></span>
<span><b class="btn btn-star" id="top-Start">探索更多</b></span>
</div>
</div>
</div>
<div id="kratos-blog" class="kratos-page-default">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center heading-section animate-box">
<h3><?php echo kratos_option('krsort_hm_tx3'); ?></h3>
<p><?php echo kratos_option('krsort_hm_tx4'); ?></p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php query_posts('showposts=3&cat=' . kratos_option('krsort_hm_bk1') . '')?>
<?php while (have_posts()) : the_post(); ?>
<div class="col-md-4 col-sm-6 col-xs-6 col-xxs-12 animate-box">
<div class="kratos-post ">
<div class="kratos-post-image">
<div class="kratos-overlay"></div>
<div class="kratos-category"><a href="<?php the_permalink() ?>"><i class="fa fa-heart-o"></i> <?php if( get_post_meta($post->ID,'love',true) ){ echo get_post_meta($post->ID,'love',true); } else { echo '0'; }?></a>
</div>
<?php kratos_blog_thumbnail_new() ?>
</div>
<div class="kratos-post-text">
<a href="<?php the_permalink() ?>"><h3 class="text-center"><?php the_title(); ?></h3></a>
<p><?php echo wp_trim_words(get_the_excerpt(), 60); ?></p>
</div>
</div>
</div>
<div class="clearfix visible-sm-block"></div>
<?php endwhile;?>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 text-center animate-box">
<a href="<?php echo kratos_option('krsort_hm_tx5'); ?>" class="btn btn-primary view-more-1">查看更多</a>
</div>
</div>
</div>
</div>
<div id="kratos-blog" class="kratos-page-gray">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center heading-section animate-box">
<h3><?php echo kratos_option('krsort_hm_tx6'); ?></h3>
<p><?php echo kratos_option('krsort_hm_tx7'); ?></p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php query_posts('showposts=3&cat=' . kratos_option('krsort_hm_bk2') . '')?>
<?php while (have_posts()) : the_post(); ?>
<div class="col-md-4 col-sm-6 col-xs-6 col-xxs-12 animate-box">
<div class="kratos-post ">
<div class="kratos-post-image">
<div class="kratos-overlay"></div>
<div class="kratos-category"><a href="<?php the_permalink() ?>"><i class="fa fa-heart-o"></i> <?php if( get_post_meta($post->ID,'love',true) ){ echo get_post_meta($post->ID,'love',true); } else { echo '0'; }?></a>
</div>
<?php kratos_blog_thumbnail_new() ?>
</div>
<div class="kratos-post-text">
<a href="<?php the_permalink() ?>"><h3 class="text-center"><?php the_title(); ?></h3></a>
<p><?php echo wp_trim_words(get_the_excerpt(), 60); ?></p>
</div>
</div>
</div>
<div class="clearfix visible-sm-block"></div>
<?php endwhile;?>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 text-center animate-box">
<a href="<?php echo kratos_option('krsort_hm_tx8'); ?>" class="btn btn-primary view-more-1">查看更多</a>
</div>
</div>
</div>
</div>
<div id="kratos-blog" class="kratos-page-default">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center heading-section animate-box">
<h3><?php echo kratos_option('krsort_hm_tx9'); ?></h3>
<p><?php echo kratos_option('krsort_hm_tx10'); ?></p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php query_posts('showposts=3&cat=' . kratos_option('krsort_hm_bk3') . '')?>
<?php while (have_posts()) : the_post(); ?>
<div class="col-md-4 col-sm-6 col-xs-6 col-xxs-12 animate-box">
<div class="kratos-post ">
<div class="kratos-post-image">
<div class="kratos-overlay"></div>
<div class="kratos-category"><a href="<?php the_permalink() ?>"><i class="fa fa-heart-o"></i> <?php if( get_post_meta($post->ID,'love',true) ){ echo get_post_meta($post->ID,'love',true); } else { echo '0'; }?></a>
</div>
<?php kratos_blog_thumbnail_new() ?>
</div>
<div class="kratos-post-text">
<a href="<?php the_permalink() ?>"><h3 class="text-center"><?php the_title(); ?></h3></a>
<p><?php echo wp_trim_words(get_the_excerpt(), 60); ?></p>
</div>
</div>
</div>
<div class="clearfix visible-sm-block"></div>
<?php endwhile;?>
</div>
<div class="row">
<div class="col-md-4 col-md-offset-4 text-center animate-box">
<a href="<?php echo kratos_option('krsort_hm_tx11'); ?>" class="btn btn-primary view-more-1">查看更多</a>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>