forked from SimonPadbury/bst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
executable file
·49 lines (42 loc) · 1.5 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
<?php
/*
Template Name: Search Page
*/
?>
<?php get_template_part('parts/header'); ?>
<div class="container">
<div class="row visible-xs">
<div class="col-xs-12">
<button style="margin-bottom: 20px;" type="button" class="pull-right btn btn-default" data-toggle="offcanvas">Off-canvas sidebar <i class="glyphicon glyphicon-arrow-right"></i>
</button>
</div>
</div>
<div class="row row-offcanvas row-offcanvas-right">
<div class="col-xs-12 col-sm-8">
<div id="content" role="main">
<h2>Search Results for “<?php the_search_query(); ?>”</h2>
<hr/>
<?php if(have_posts()): while(have_posts()): the_post();?>
<article role="article" id="post_<?php the_ID()?>" <?php post_class()?>>
<header>
<h4><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h4>
</header>
<?php the_excerpt(); ?>
<hr/>
</article>
<?php endwhile; ?>
<?php else: ?>
<div class="alert alert-warning">
<i class="glyphicon glyphicon-exclamation-sign"></i> Sorry, your search yielded no results.
</div>
<?php endif;?>
</div><!-- #content -->
</div>
<div class="col-xs-6 col-sm-4 sidebar-offcanvas" id="sidebar" role="navigation">
<div class="panel panel-default">
<?php get_template_part('parts/sidebar'); ?>
</div>
</div>
</div><!-- .row -->
</div><!-- .container -->
<?php get_template_part('parts/footer'); ?>