-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
50 lines (44 loc) · 1.94 KB
/
Copy pathsearch.php
File metadata and controls
50 lines (44 loc) · 1.94 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
<?php
/**
* Search results template.
*
* Loads content from `content-search.php` to display the content of each matching post.
*
* @package Axon
*/
get_header();
?>
<main class="site-main" role="main" aria-label="<?php echo esc_attr_x( 'Main content', 'ARIA label for main region', theme_get_text_domain() ); ?>">
<?php get_template_part( 'templates/parts/hero', 'global' ); ?>
<section class="search" role="region" aria-label="<?php echo esc_attr_x( 'Search results content region', 'ARIA label for search results content region', theme_get_text_domain() ); ?>">
<div class="container search__container">
<div class="row search__header-row">
<div class="col search__header-col">
<h2 class="search__title">
<?php echo sprintf( esc_html__( 'Search results for: %s', theme_get_text_domain() ), get_search_query() ); ?>
</h2>
</div> <!-- end search__header-col -->
</div> <!-- end search__header-row -->
<div class="row search__results-row">
<div class="col search__results-col">
<?php if ( have_posts() ) {
while ( have_posts() ) {
the_post();
get_template_part( 'templates/parts/content', 'search' );
}
} else { ?>
<p class="search__empty">
<?php esc_html_e( 'Sorry, no results found.', theme_get_text_domain() ); ?>
</p>
<?php } ?>
</div> <!-- end search__results-col -->
</div> <!-- end search__results-row -->
</div> <!-- end search__container -->
</section>
<?php
if ( have_posts() ) {
get_template_part( 'templates/parts/pagination', 'section' );
}
?>
</main>
<?php get_footer(); ?>