-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsearch.php
41 lines (38 loc) · 1.21 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
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package Hotlink
* @subpackage Hotlink Theme
*/
// 検索结果用
$search_query =& new WP_Query("s=$s & showposts=-1");
get_header(); ?>
<section class="main clearfix">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" class="search_post">
<div class="search_title">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
<?php the_title(); ?>
<span class="search_text"><?php the_excerpt(); ?></span>
</a></div>
<?php the_date() ?> <?php the_time() ?>
</div>
<?php endwhile; else: ?>
<p class="search_text">
<?php _e('您要搜索的内容不存在'); ?>
</p>
<?php endif; ?>
<div class="nav-previous">
<?php previous_posts_link(__('« Older Entries', 'kubrick')); ?>
</div>
<div class="nav-next">
<?php next_posts_link(__('Newer Entries »', 'kubrick')); ?>
</div>
</section>
<?php get_footer(); ?>