-
Notifications
You must be signed in to change notification settings - Fork 217
/
search.php
58 lines (48 loc) · 1.27 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
<?php
/**
* Search result page.
*/
get_header();
global $wp_query;
//echo '<pre/>';
//print_r($wp_query);
//wp_die();
?>
<div id="primary">
<main id="main" class="site-main mt-5" role="main">
<div class="container">
<header class="mb-5">
<h1 class="page-title"> <?php echo $wp_query->found_posts; ?>
<?php _e( 'Search Results Found For', 'locale' ); ?>: "<?php the_search_query(); ?>"
</h1>
</header>
<?php if ( have_posts() ) { ?>
<div>
<?php while ( have_posts() ) {
the_post(); ?>
<div class="card mb-5 pb-3">
<div class="card-body">
<h3 class="card-title">
<a href="<?php echo esc_url(get_the_permalink()); ?>">
<?php the_title(); ?>
</a>
</h3>
<div class="search-card-container">
<?php the_post_custom_thumbnail( get_the_ID(), 'medium', [ 'class' => 'search-card-thumbnail' ] ); ?>
<div class="search-card-content">
<?php aquila_the_excerpt(); ?>
<?php echo aquila_excerpt_more(); ?>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<?php aquila_pagination(); ?>
<?php } else {
get_search_form();
}?>
</div>
</main>
</div>
<?php get_footer(); ?>