forked from jbrad/standard
-
Notifications
You must be signed in to change notification settings - Fork 3
/
search.php
67 lines (51 loc) · 2.23 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
<?php
/**
* The template for displaying search results. It's based on index.php. If the user has the Google Custom Search Widget enabled, then Standard
* will display that template rather than the default search results page.
*
* @package Standard
* @since 3.0
* @version 3.0
*/
?>
<?php get_header(); ?>
<?php $presentation_options = get_option( 'standard_theme_presentation_options' ); ?>
<div id="wrapper">
<div class="container">
<div class="row">
<?php if ( 'left_sidebar_layout' == $presentation_options['layout'] ) { ?>
<?php get_sidebar(); ?>
<?php } // end if ?>
<div id="main" class="<?php echo 'full_width_layout' == $presentation_options['layout'] ? 'span12 fullwidth' : 'span8'; ?> clearfix" role="main">
<?php // Even if google custom search is active, we may be coming from the 4040 page so we'll run this template. ?>
<?php if( ! standard_google_custom_search_is_active() || '' != get_query_var( 's' ) ) { ?>
<?php get_template_part( 'breadcrumbs' ); ?>
<div id="search-page-title">
<h3><?php _e( 'Search Results For "', 'standard' ); echo get_query_var( 's' ); _e( '"', 'standard' ); ?></h3>
</div>
<?php if ( have_posts() ) { ?>
<?php while ( have_posts() ) { ?>
<?php the_post(); ?>
<?php get_template_part( 'loop', get_post_format() ); ?>
<?php } // end while ?>
<?php get_template_part( 'pagination' ); ?>
<?php } else { ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Page or resource not found', 'standard' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'No results were found.', 'standard' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php } // end if/else ?>
</div><!-- /#main -->
<?php if ( 'right_sidebar_layout' == $presentation_options['layout'] ) { ?>
<?php get_sidebar(); ?>
<?php } // end if ?>
<?php } // end if ?>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /#wrapper -->
<?php get_footer(); ?>