-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
36 lines (33 loc) · 872 Bytes
/
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
<?php
/**
* The template for displaying search results pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package good-guitarist
*/
get_header(); ?>
<div class="search-results">
<div id="primary" class="content-area">
<?php get_search_form(); ?>
<header>
<h1 class="page-title">
<?php esc_html_e( 'Search Results', 'good-guitarist' ); ?>
</h1>
</header><!-- .page-header -->
<main id="main" class="site-main" role="main">
<?php if ( have_posts() ): ?>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'views/content-search', get_post_format() );
endwhile;
?>
<?php else : ?>
<?php get_template_part( 'views/content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- .container -->
<?php
get_footer();