-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
executable file
·48 lines (31 loc) · 1.07 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
<?php
/**
* This is the template that is used to search results
*
* @since 1.0
* @package WeFoster Framework
*/
?>
<?php get_template_part( 'header' ); ?>
<div id="main-content" class="main <?php do_action( 'wf_class_main' ); ?>" role="main">
<?php get_template_part( 'templates/parts/page', 'header' ); ?>
<?php if ( ! have_posts() ) : ?>
<div class="alert alert-warning">
<?php _e( 'Sorry, no results were found.', 'wefoster' ); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'templates/loops/content', get_post_format() ); ?>
<?php endwhile; ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<nav class="post-nav">
<ul class="pager">
<li class="previous"><?php next_posts_link( __( '← Older posts', 'wefoster' ) ); ?></li>
<li class="next"><?php previous_posts_link( __( 'Newer posts →', 'wefoster' ) ); ?></li>
</ul>
</nav>
<?php endif; ?>
</div><!-- /.main -->
<?php get_template_part( 'sidebar' ); ?>
<?php get_template_part( 'footer' ); ?>