forked from yutianhot/zibll
-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
70 lines (69 loc) · 2.01 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
67
68
69
70
<?php
get_header();
?>
<?php if (function_exists('dynamic_sidebar')) {
echo '<div class="container fluid-widget">';
dynamic_sidebar('all_top_fluid');
dynamic_sidebar('search_top_fluid');
echo '</div>';
}
?>
<main class="container">
<div class="content-wrap">
<div class="content-layout">
<?php if (function_exists('dynamic_sidebar')) {
dynamic_sidebar('search_top_content');
}
?>
<div class="ajaxpager">
<div class="main-bg theme-box box-body radius8 main-shadow">
<div class="title-h-left"><b>搜索精彩内容</b></div>
<?php zib_get_search(); ?>
</div>
<?php
if (!have_posts()) {
echo '<div class="main-bg theme-box box-body radius8 main-shadow text-center">';
echo '<img class="search-null-img" src="' . get_stylesheet_directory_uri() . '/img/search-null.png">';
echo '<p class="muted-color box-body separator">未找到相关结果</p>';
echo '</div>';
} else {
$tt = '全部内容';
if ($s) {
/**保存搜索关键词 */
zib_update_search_keywords($s);
$tt = '包含"<b class="focus-color search-keyword">' . $s . '</b>"的全部内容';
}
if ($cat) {
$cat_a = get_category($cat);
if ($cat_a) {
$tt = '在分类<b class="focus-color">"' . $cat_a->cat_name . '"</b>中' . $tt;
}
}
echo '<div class="main-bg theme-box radius8 main-shadow overflow-hidden">';
echo '<div class="box-body nobottom"><div class="title-h-left">' . $tt . '</div></div>';
$args = array(
'no_margin' => true,
'is_card' => false,
);
zib_posts_list($args);
zib_paging();
echo '</div>';
}
echo '</div>';
?>
<?php if (function_exists('dynamic_sidebar')) {
dynamic_sidebar('search_bottom_content');
}
?>
</div>
</div>
<?php get_sidebar(); ?>
</main>
<?php if (function_exists('dynamic_sidebar')) {
echo '<div class="container fluid-widget">';
dynamic_sidebar('search_bottom_fluid');
dynamic_sidebar('all_bottom_fluid');
echo '</div>';
}
?>
<?php get_footer();