-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
38 lines (37 loc) · 1.05 KB
/
search.php
File metadata and controls
38 lines (37 loc) · 1.05 KB
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
<?php
get_header();
global $wp_query;
$total_results = $wp_query->found_posts;
?>
<div class="site-content">
<section class="module u-bg-light-gray">
<div class="module__content u-container">
<header class="module__header">
<div class="module-title">Search</div>
</header>
<div class="module__body">
<h5><?php printf( '(%d) Results for: "%s"', $total_results, get_search_query() ); ?></h5>
<?php
if( have_posts() )
{
while ( have_posts() )
{
the_post();
get_template_part( 'content', 'search' );
}
the_posts_pagination( array(
'prev_text' => 'Previous ',
'next_text' => ' Next',
'before_page_number' => '<span class="meta-nav screen-reader-text">' . 'Page' . ' </span>',
) );
}
else
{
get_template_part( 'content', 'none' );
}
?>
</div>
</div>
</section>
</div>
<?php get_footer(); ?>