-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
43 lines (33 loc) · 1009 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
37
38
39
40
41
42
43
<?php
if ( !defined('ABSPATH') ) exit;
get_header();
?>
<section class="search-index">
<div class="container">
<div class="search-index--title">
<h1>Search Results:</h1>
<h3><em>"<?php the_search_query() ?>"</em></h3>
</div>
<div class="search-index--content">
<?php if ( have_posts() ) : ?>
<div class="posts-grid">
<div class="flex">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part('partials/posts/post-entry'); ?>
<?php endwhile; ?>
<?php else : ?>
<h3>No Posts Found</h3>
<p>Try another search?</p>
<?php get_search_form(); ?>
</div>
</div>
<?php endif; ?>
</div>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div class="search-index--pagination">
<?php get_template_part('partials/posts/post-pagination'); ?>
</div>
<?php endif; ?>
</div>
</section>
<?php get_footer(); ?>