-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
68 lines (46 loc) · 1.3 KB
/
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
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
<?php
/**
* The template for displaying search results pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package Upside Down
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<section class="container">
<div id="search-header" class="row">
<div class="column">
<h4><?php printf( __( 'Search Results for: %s', 'upsidedown' ), '<span>' . get_search_query() . '</span>' ); ?></h4>
</div>
</div>
</section>
<section class="container">
<?php
if ( have_posts() ) : ?>
<?php $i = 1; ?>
<div class="row">
<!-- /* Start the Loop */ -->
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/post/content', 'card' );
if( $i == 3 ){
echo '</div><div class="row">';
$i = 0;
}
$i++;
endwhile; ?> <!-- // End of the loop. -->
</div>
<?php the_posts_pagination();
else : ?>
<div class="row main-card">
<div class="column">
<div id="no-post">
<h5><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'upsidedown' ); ?></h5>
<?php get_search_form(); ?>
</div>
</div>
</div>
<?php endif; ?>
</section>
<?php get_footer();