-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
56 lines (47 loc) · 1.49 KB
/
search.php
File metadata and controls
56 lines (47 loc) · 1.49 KB
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
<?php
/**
*
* The template for displaying search results pages
*
* @package Codexin
* @subpackage Templates
* @since 1.0
*/
// Do not allow directly accessing this file.
defined( 'ABSPATH' ) OR die( esc_html__( 'This script cannot be accessed directly.', 'TEXT_DOMAIN' ) );
get_header(); ?>
<!-- Start of Main Content Wrapper -->
<div id="content" class="main-content-wrapper">
<div class="container">
<div class="row">
<div class="col-12 col-sm-12 col-md-12 col-lg-12">
<main id="primary" class="site-main">
<div class="blog-area">
<?php
if ( have_posts() ) {
// Start the loop
while ( have_posts() ) {
the_post();
// Load the Post-Format-specific template for the content.
get_template_part( 'template-parts/post/content', get_post_format() );
}
} else { ?>
<h2 class="search-title text-center">
<?php printf( '%1$s"'. get_search_query() .'"', esc_html__( 'Nothing found for the search keyword ', 'TEXT_DOMAIN' ) ); ?>
</h2>
<p><?php esc_html_e( 'Please use the menu above to locate what you are searching for. Or you can try searching with a keyword below:', 'TEXT_DOMAIN' ) ?></p>
<?php get_search_form();
}
?>
</div> <!-- end of blog-area -->
<?php
// Rendering Pagination
codexin_posts_nav();
?>
</main> <!-- end of #primary -->
</div>
</div>
</div> <!-- end of container -->
</div>
<!-- End of Main Content Wrapper -->
<?php get_footer() ?>