-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
47 lines (39 loc) · 995 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
44
45
46
47
<?php
/*
* The template for displaying search results pages.
*
* @package Valhalla
* @subpackage Templates
*/
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
exit( 'Direct script access denied.' );
}
?>
<?php get_header('2'); ?>
<div class="main-content-area">
<div class="container-fluid search-section1">
<div class="search-page-form">
<?php get_search_form(); ?>
</div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="card mb-3">
<div class="card-body">
<h5 class="search-post-title card-title"><a href="<?php the_permalink(); ?>">
<?php the_title(); ?></a></h5>
<p class="search-post-excerpt card-text">
<?php the_excerpt(); ?>
</p>
</div>
</div>
<?php endwhile; ?>
<div class="pages-navigation">
<?php echo wp_kses_post(paginate_links( $args )); ?>
</div>
<?php else : ?>
<?php get_template_part( 'template-parts/404-template' ); ?>
<?php endif; ?>
</div>
<div class="content-separator"></div>
</div>
<?php get_footer(); ?>