-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsearch.php
More file actions
79 lines (58 loc) · 1.35 KB
/
search.php
File metadata and controls
79 lines (58 loc) · 1.35 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
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
75
76
77
78
79
<?php
/**
* Search Results Template
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package Granule
* @subpackage Template
* @author Ben Gillbanks <ben@prothemedesign.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
*/
get_header();
?>
<main id="main">
<header class="entry-archive-header">
<h1 class="entry-title entry-archive-title">
<?php
printf(
wp_kses(
/* Translators: %s: Search query */
__( '<span>Search results for:</span> %s', 'granule' ),
array(
'span' => array(),
)
),
esc_html( get_search_query() )
);
?>
</h1>
</header>
<div class="search-wrapper">
<?php get_search_form(); ?>
</div>
<div id="infinite-scroll" class="content-masonry-wrapper">
<div id="main-content" class="main-content content-posts content-masonry">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'parts/content', 'format-' . get_post_format() );
}
?>
</div>
</div>
<?php
the_posts_pagination(
array(
'mid_size' => 2,
'prev_text' => esc_html__( 'Newer', 'granule' ),
'next_text' => esc_html__( 'Older', 'granule' ),
'before_page_number' => '<span class="screen-reader-text"> ' . __( 'page', 'granule' ) . ' </span>',
)
);
}
?>
</main>
<?php
get_footer();