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
/
index.php
72 lines (71 loc) · 1.97 KB
/
index.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
<?php
/**
* The main template file
*
* @author Vtrois <[email protected]>
* @license GPL-3.0
*/
get_header(); ?>
<?php
if(is_category()){
get_header('abstract');
}else{
get_header('banner');
} ?>
<div id="kratos-blog-post" style="background:<?php echo kratos_option('background_index_color'); ?>">
<div class="container">
<div class="row">
<section id="main" class="col-md-8">
<?php
if(is_home()){
kratos_banner();
}elseif(is_category()){
?>
<?php if ( kratos_option( 'show_head_cat' ) ) : ?>
<div class="kratos-hentry clearfix">
<h1 class="kratos-post-header-title">分类:<?php echo single_cat_title('', false); ?></h1>
<h1 class="kratos-post-header-title"><?php echo category_description(); ?></h1>
</div>
<?php endif; ?>
<?php
}elseif(is_tag()){
?>
<?php if ( kratos_option( 'show_head_tag' ) ) : ?>
<div class="kratos-hentry clearfix">
<h1 class="kratos-post-header-title">标签:<?php echo single_cat_title('', false); ?></h1>
<h1 class="kratos-post-header-title"><?php echo category_description(); ?></h1>
</div>
<?php endif; ?>
<?php
}elseif(is_search()){
?>
<div class="kratos-hentry clearfix">
<h1 class="kratos-post-header-title">搜索结果:<?php the_search_query(); ?></h1>
</div>
<?php
}
?>
<?php
if ( have_posts() ) {
while ( have_posts() ){
the_post();
get_template_part('content', get_post_format());
}
}else{
?>
<div class="kratos-hentry clearfix">
<h1 class="kratos-post-header-title">很抱歉,没有找到任何内容。</h1>
</div>
<?php } ?>
<?php kratos_pages(3);?>
<?php wp_reset_query(); ?>
</section>
<aside id="kratos-widget-area" class="col-md-4 hidden-xs hidden-sm scrollspy">
<div id="sidebar">
<?php dynamic_sidebar('sidebar_tool'); ?>
</div>
</aside>
</div>
</div>
</div>
<?php get_footer(); ?>