Fixes for PHP5.6 -> PHP7 upgrade
[libpress/php7-plugin-fixes.git] / themes / prototype / search.php
1 <?php
2 /**
3  * The template for displaying Search Results pages.
4  *
5  * @package prototype
6  */
7
8 get_header(); ?>
9         <div class="layout">
10                 <div class="row">
11                         <?php if ( have_posts() ) : ?>
12                                 <div class="search-page-header">
13                                         <h1 class="page-title">Search Results</h1>
14                                         <p class="search-result"><?php printf( __( 'Your search for %s', 'prototype' ), '<span class="search-term">' . get_search_query() . '</span>' ); ?> returned <span class="search-term"><?php /*  Search Count */ $allsearch = new  WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1);  $count = $allsearch->post_count; _e(''); echo $count . ' '; _e('results'); wp_reset_query(); ?></span></p>
15                                 </div><!-- .page-header -->
16                                 <?php /* Start the Loop */ ?>
17                                         <?php while ( have_posts() ) : the_post(); ?>                   
18                                                 <div class="search-result-entry">
19                                                         <hr><!-- Inside the entry to keep constrained to width of content items -->
20                                                         <h3 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark"><?php echo get_the_title(); ?></a></h3>
21                                                         <span class="search-result-meta"><span class="search-date-label">Last Updated </span><span class="search-modified-date"><?php the_modified_date(); ?></span></span>
22                                                         <?php echo get_the_excerpt(); ?>
23                                                 </div>
24                                         <?php endwhile; ?>
25                                 <?php else : ?>
26                                         <div class="search-page-header no-results">
27                                                 <h1 class="page-title">Search Results</h1>
28                                                 <p class="search-result"><?php printf( __( 'Your search for %s', 'prototype' ), '<span class="search-term">' . get_search_query() . '</span>' ); ?> returned <span class="search-term"><?php /*  Search Count */ $allsearch = new  WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1);  $count = $allsearch->post_count; _e('');  echo $count . ' '; _e('results'); wp_reset_query(); ?></span></p>
29                                         </div><!-- search-page-header -->
30                                         <?php get_footer(); ?>
31                         <?php endif; ?>
32                         <?php pagination($additional_loop->max_num_pages); ?>
33         </div><!-- row -->
34 </div><!-- layout -->
35 <?php get_footer(); ?>