-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
66 lines (61 loc) · 2 KB
/
search.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
<?php
/*
Template Name: Search Page
*/
get_header();?>
<style>
.post-index-header .post_content .searchform input#s{
width: calc(100% - 60px);
}
nav.post_nav_bds{
padding-bottom: 0 !important;
margin-bottom: -13.6px;
}
</style>
<?php if (have_posts()) : ?>
<div id="page-warp">
<div id="content">
<article class="post-index-header post type-page status-publish hentry">
<hgroup class="post_header" style="padding-bottom: .8em;">
<h2 class="post_title"><?php echo isset($_GET['s']) ? $_GET['s'] : '(空)'; ?> 的搜索结果</h2>
</hgroup>
<div class="post_content">
<?php get_search_form(); ?>
</div>
</article>
</div>
</div>
<?php while (have_posts()) : the_post(); ?>
<div id="page-warp">
<div id="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 id="page-warp">
<div id="content">
<article class="post-index-header post type-page status-publish hentry">
<hgroup class="post_header" style="padding-bottom: .8em;"><h2 class="post_title">
<?php echo isset($_GET['s']) ? $_GET['s'] : '(空)'; ?> 的搜索结果</h2>
</hgroup>
<div class="post_content">
<?php get_search_form(); ?><br>
<p>很抱歉,没有找到与“<?php echo isset($_GET['s']) ? $_GET['s'] : '(空)'; ?>”相关的结果。请检查您输入的关键词是否正确。</p>
</div>
<nav class="post_nav_bds">
<a href="<?php echo $clrs_siteURL; ?>" rel="home" class="goHome">
<i class="fa fa-home" aria-hidden="true"> 返回首页</i>
</a>
</nav>
</article>
</div>
</div>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>