summaryrefslogtreecommitdiff
path: root/search.php
blob: e0b9b7bd79dcfcef5cb536bda4ea8f3f063204e0 (plain)
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
<?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(); ?>