-
Notifications
You must be signed in to change notification settings - Fork 6
/
search.php
31 lines (27 loc) · 1.02 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
<?php
/**
* The template for displaying search results pages.
*
* @package Radix
* @since Radix 1.0
*/
get_header();
$col= 'col-md-12';
if ( is_active_sidebar( 'sidebar' ) ) {
$col = 'col-md-9';
} ?>
<div id="primary" class="content-area <?php echo $col; ?>" itemtype="http://schema.org/SearchResultsPage" itemscope="itemscope">
<?php if ( have_posts() ) : ?>
<header class="entry-header">
<h2 class="search-title"><?php $allsearch = new WP_Query("s=$s&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; echo $count . ' '; wp_reset_query(); ?><?php printf( __( ' Search Results found for' , 'radix') . '<span class="text-muted"> %s</span>', get_search_query() ); ?></h2>
</header>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'loop/content', 'search' ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php get_template_part( 'loop/content', 'none' ); ?>
<?php endif; ?>
</div> <!--#primary -->
<?php get_sidebar(); ?>
<?php get_footer();