Skip to content

Commit

Permalink
create search.php
Browse files Browse the repository at this point in the history
this is the page to show the result you search.
  • Loading branch information
NightSiesta authored Aug 2, 2016
1 parent 07d8005 commit f774522
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions search.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
$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(); ?>
</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(); ?>

0 comments on commit f774522

Please sign in to comment.