-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
73 lines (67 loc) · 2.43 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
73
<?php get_header(); ?>
<?php
$clrs_index_header = get_option('clrs_index_header');
$clrs_index_header_title = get_option('clrs_index_header_title');
$clrs_index_header_link = get_option('clrs_index_header_link');
if(is_home() && $wp_query->query_vars['paged'] <2 && !empty($clrs_index_header)){ ?>
<div class="page-warp">
<div class="content">
<article class="post-index-header post type-page status-publish hentry">
<?php if(!empty($clrs_index_header_title)){ ?>
<hgroup class="post_header" style="padding-bottom: .8em;">
<h2 class="post_title">
<?php if(!empty($clrs_index_header_link)){ ?>
<a href="<?php echo $clrs_index_header_link; ?>"><?php echo $clrs_index_header_title ?></a>
<?php } else { ?>
<?php echo $clrs_index_header_title ?>
<?php } ?>
</h2><br />
</hgroup>
<?php } ?>
<div class="post_content">
<?php echo clrs_shortcode_content(wpautop($clrs_index_header)); ?>
</div>
</article>
</div>
</div>
<?php } ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="page-warp">
<div class="content">
<article <?php post_class(); ?>>
<?php get_template_part('content'); ?>
</article>
</div>
</div>
<?php endwhile; ?>
<div id="page_nav">
<?php clrs_pagenavi(); ?>
</div>
<?php else : ?>
<div class="page-warp">
<div class="content">
<article class="post-index-header post type-page status-publish hentry">
<hgroup class="post_header" style="padding-bottom: .8em;">
<h2 class="post_title">找不到内容</h2>
</hgroup>
<div class="post_content">
<p>对不起,没有找到相关的内容,请重试</p>
<?php get_search_form(); ?>
</div>
</article>
</div>
</div>
<?php endif; ?>
<?php $ldis = get_option('clrs_link_display');
$c_ldis = $ldis !== "yes" ? 'style="display: none"' : ''; ?>
<div id="link" <?php echo $c_ldis; ?>>
<div id="link_content">
<h3 id="link-head">
<?php __('友情链接', 'clrs'); ?>
</h3>
<?php echo get_option('clrs_link'); ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>