-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathsearch.php
37 lines (37 loc) · 966 Bytes
/
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
<?php get_header(); ?>
<div class="content-wrap">
<div class="content">
<?php if ( !have_posts() ) : ?>
<header class="archive-header">
<h1>没有找到有关【<?php echo htmlspecialchars($s); ?>】的内容</h1>
<p class="muted">给您推荐以下内容:</p>
</header>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'showposts' => 4,
'ignore_sticky_posts' => 1,
'paged' => $paged
);
query_posts($args);
?>
<?php if (git_get_option('git_card_b'))
{
include 'modules/card.php';
}else{
include 'modules/excerpt.php';
}?>
<?php else: ?>
<header class="archive-header">
<h1>有关【<?php echo htmlspecialchars($s); ?>】的内容</h1>
</header>
<?php if (git_get_option('git_card_b'))
{
include 'modules/card.php';
}else{
include 'modules/excerpt.php';
}?>
<?php endif; ?>
</div>
</div>
<?php get_sidebar(); get_footer(); ?>