diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-27 12:23:12 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-11-27 12:23:12 -0500 |
commit | 8e2064bbd878ac93438a6616cbf4af21a0f41edd (patch) | |
tree | 113cd09cd2dd11d02455d575037dd1f32bb4aaea /search.php |
I'm not planning on maintaining this, I just figured I'd put it in git in
case I ever want it.
This has already been cleaned up a lot.
I might one day do the work to make it a proper child theme (it was forked
too many versions ago for it to be clean), but probably not.
Diffstat (limited to 'search.php')
-rw-r--r-- | search.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/search.php b/search.php new file mode 100644 index 0000000..e0b9b7b --- /dev/null +++ b/search.php @@ -0,0 +1,42 @@ +<?php
+/**
+ * The template for displaying Search Results pages.
+ *
+ * @package WordPress
+ * @subpackage Twenty_Ten
+ * @since Twenty Ten 1.0
+ */
+
+get_header(); ?>
+ <div class="main"><a class="nocss" id="content"></a>
+ <?php
+ global $head;
+ echo "<h$head class=\"page-title\">";
+ printf( __( 'Search Results for: "%s"', 'twentyten' ), '<span>'.get_search_query().'</span>' );
+ echo "</h$head>";
+ $head++;
+ if ( have_posts() ) {
+ get_template_part( 'loop', 'search' );
+ } else {
+ ?>
+ <?php
+ echo "<h$head class=\"entry-title post no-results not-found\">";
+ _e( 'Nothing Found', 'twentyten' );
+ echo "</h$head>";
+ $head++
+ ?>
+ <div class="entry-content">
+ <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?></p>
+ <?php get_search_form(); ?>
+ </div><!-- .entry-content -->
+ <?php
+ $head--;
+ ?>
+ </div><!-- #post-0 -->
+ <?php
+ }
+ $head--;
+ ?>
+ </div>
+
+<?php get_footer(); ?>
|