-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
search.php
46 lines (39 loc) · 1.34 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
<?php
/**
* The template for displaying search results pages.
*/
if ( !defined('ABSPATH') ){ //Redirect (for logging) if accessed directly
header('Location: http://' . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], "wp-content/")) . '?ndaat=' . basename($_SERVER['PHP_SELF'])); //@todo "Nebula" 0: Update strpos() to str_contains() in PHP8
exit;
}
do_action('nebula_preheaders');
get_header();
?>
<?php get_template_part('inc/headercontent'); ?>
<?php get_template_part('inc/nebula_drawer'); ?>
<?php nebula()->timer('Search Template'); ?>
<main id="content-section" role="main">
<div class="container">
<div class="row">
<div class="col">
<?php nebula()->breadcrumbs(); ?>
</div><!--/col-->
</div><!--/row-->
<div class="row">
<div id="top" class="col">
<?php if ( have_posts() ): ?>
<div id="searchresults">
<?php get_template_part('loop', 'search'); ?>
</div>
<?php do_action('nebula_after_search_results'); ?>
<?php else: ?>
<p class="no-search-results"><?php _e('No search results.', 'nebula'); ?></p>
<?php do_action('nebula_no_search_results'); ?>
<?php endif; ?>
</div><!--/col-->
<?php get_sidebar(); ?>
</div><!--/row-->
</div><!--/container-->
</main>
<?php nebula()->timer('Search Template', 'end'); ?>
<?php get_footer(); ?>