-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
54 lines (46 loc) · 1.57 KB
/
search.php
File metadata and controls
54 lines (46 loc) · 1.57 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
<?php
/**
* Template for displaying Search Results pages
*
* Search results follow the same pattern as other template types:
*
* 1. search.php
* 2. index.php
*
* Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package WP_Basic_Bootstrap
* @since WP_Basic_Bootstrap 1.0
*/
$template = get_template_type();
$page_type = get_page_type();
if (BASICBOOTSTRAP_TPLDBG) {
error_log('loaded file : '.__FILE__);
error_log('page type : '.$page_type);
error_log('applied template : '.$template);
}
get_header_hierarchical('search'); ?>
<div id="content" role="main">
<?php get_the_breadcrumb(); ?>
<header class="header">
<h1 class="entry-title">
<?php printf(__('Search results for "%s"', 'basicbootstrap'), '<span>' . get_search_query() . '</span>'); ?>
</h1>
</header>
<hr />
<?php if (have_posts()) : ?>
<?php get_template_part_hierarchical('partials/loop'); ?>
<?php else: ?>
<article id="post-0" class="post no-results not-found">
<header class="header">
<h2 class="entry-title"><?php _e('Nothing Found', 'basicbootstrap'); ?></h2>
</header>
<section class="entry-content">
<p><?php _e('Sorry, nothing matched your search. Please try again.', 'basicbootstrap'); ?></p>
<?php get_search_form_hierarchical(); ?>
</section>
</article>
<?php endif; ?>
</div>
<?php get_sidebar_hierarchical('search'); ?>
<?php get_footer_hierarchical('search'); ?>