forked from twbs/bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 136
/
search.php
executable file
·74 lines (67 loc) · 2.8 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
68
69
70
71
72
73
74
<?php
/**
* Search Results Template
*
* @package WordPress
* @subpackage BootstrapWP
*/
get_header(); ?>
<div class="container">
<div class="row">
<div class="span12">
<?php if (function_exists('bootstrapwp_breadcrumbs')) {
bootstrapwp_breadcrumbs();
} ?>
</div>
</div><!--/.row -->
<div class="row content">
<div class="span8">
<?php if (have_posts()) : ?>
<header class="post-title">
<h1><?php printf( __('Search Results for: %s', 'bootstrapwp'),'<span>' . get_search_query() . '</span>'); ?></h1>
</header>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<a href="<?php the_permalink(); ?>" title="<?php the_title();?>">
<h3><?php the_title();?></h3>
</a>
<p class="meta">
<?php echo bootstrapwp_posted_on();?>
</p>
<div class="row">
<?php // Post thumbnail conditional display.
if ( bootstrapwp_autoset_featured_img() !== false ) : ?>
<div class="span2">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute( 'echo=0' ); ?>">
<?php echo bootstrapwp_autoset_featured_img(); ?>
</a>
</div>
<div class="span6">
<?php else : ?>
<div class="span8">
<?php endif; ?>
<?php the_excerpt(); ?>
</div>
</div><!-- /.row -->
<hr/>
</div><!-- /.post_class -->
<?php endwhile; ?>
<?php else : ?>
<div class="row content">
<div class="span8">
<header class="post-title">
<h1><?php _e('No Results Found', 'bootstrapwp'); ?></h1>
</header>
<p class="lead">
<?php _e(
'It seems we can’t find what you’re looking for. Perhaps you should try again with a different search term.',
'bootstrapwp'); ?>
</p>
<div class="well">
<?php get_search_form(); ?>
</div><!--/.well -->
<?php endif;?>
<?php bootstrapwp_content_nav('nav-below'); ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>