-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
46 lines (33 loc) · 789 Bytes
/
search.php
File metadata and controls
46 lines (33 loc) · 789 Bytes
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
<?php
/**
* Search results template
*
* @package MLAStyleCenter
*/
namespace MLA\Commons\Theme\MLAStyleCenter;
if ( is_category( 'ask-the-mla' ) ) {
load_template( __DIR__ . '/category-ask-the-mla.php' );
} else {
get_header();
?>
<div class="block-main">
<h1 class="search-results-title"><?php echo wp_kses_post( ThemeHelper::get_page_title() ); ?></h1>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'templates/content', 'search' );
}
} else {
get_template_part( 'templates/content', 'no-results' );
}
?>
<div class="pagination">
<div class="nav-previous"><?php next_posts_link(); ?></div>
<div class="nav-next"><?php previous_posts_link(); ?></div>
</div>
</div>
<?php
get_sidebar();
get_footer();
}