This repository has been archived by the owner. It is now read-only.
Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
hri/searchpage.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
80 lines (58 sloc)
2.53 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: Search Page | |
*/ | |
?> | |
<?php get_header();?> | |
<div id="body-container"> | |
<!-- Results Side Bar --> | |
<div class="sidebar-search"> | |
<h4 class="search-header">Search</h4> | |
<!-- Search Bar --> | |
<?php get_search_form(); ?> | |
</div> | |
<!-- End --> | |
<!-- Prosepctive content ----> | |
<div class="custom-span8"> | |
<h4 class="search-results-header">Search Results <span class="unbolding">for “<?php the_search_query(); ?>”</span></h4> | |
<!-- Start of Search Results --> | |
<!-- One Single Search Result --> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<div class="result"> <a href="<?php the_permalink(); ?>"> | |
<h4 class="result-header"> | |
<?php the_title(); ?> | |
</h4> | |
</a> | |
<div class="blog-article-meta clear"> | |
<ul> | |
<li class="archive-date"><img src="<?php bloginfo('template_url'); ?>/img/icon-calendar-green.png"/> <?php the_date(); ?></li> | |
</ul> | |
</div> | |
</a></em> | |
<span class="result-info"> | |
<?php the_excerpt();?> | |
</span> | |
</div> | |
<?php endwhile; else: ?> | |
<p> | |
<?php _e('Sorry, no content matched your criteria.'); ?> | |
</p> | |
<?php endif; ?> | |
<!-- End of single search result --> | |
<div class="navigation"> | |
<?php | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
echo paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), | |
'format' => '?paged=%#%', | |
'show_all' => 'true', | |
'current' => max( 1, get_query_var('paged') ), | |
'total' => $wp_query->max_num_pages | |
) ); | |
?> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php get_footer();?> |