-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
42 lines (41 loc) · 1.15 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
<?php
/**
*
* search.php
*
* The search results template. Used when a search is performed.
*
*/
get_header();
?>
<?php get_sidebar('top'); ?>
<?php
if (have_posts()) {
theme_post_wrapper(
array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span class="search-query-string">' . get_search_query() . '</span>') . '</h4>'
)
);
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_top_posts_navigation')) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', 'search');
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content(
array(
'error_title' => __('Nothing Found', THEME_NS),
'error_message' => __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS)
)
);
}
?>
<?php get_sidebar('bottom'); ?>
<?php get_footer(); ?>