-
-
Save jchristopher/1c0abf666210beed9205 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* The template for displaying search results pages. | |
* | |
* @package _s | |
*/ | |
get_header(); ?> | |
<div id="primary" class="contents-search-results"> | |
<main id="main" class="site-main ctn-main" role="main"> | |
<?php if ( have_posts() ) : ?> | |
<header class="page-header"> | |
<h1 class="page-title"><?php printf( esc_html__( 'Search Results', '_s' )); ?></h1> | |
<p class="search-results-numbers"> | |
<?php | |
global $wp_query; | |
$total_results = $wp_query->found_posts; | |
echo ('About <span class="totalnb">' . $total_results . '</span> Results'); | |
?> (<?php echo timer_stop( $display = 0, $precision = 3 ); ?> seconds) | |
</p> | |
</header><!-- .page-header --> | |
<div class="search-results-ajax"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php | |
/** | |
* Run the loop for the search to output the results. | |
* If you want to overload this in a child theme then include a file | |
* called content-search.php and that will be used instead. | |
*/ | |
get_template_part( 'template-parts/content', 'search' ); | |
?> | |
<?php endwhile; ?> | |
</div> | |
<div id="load-more-results" class="load-more"><a href="#" target="_self">More Results<i class="fa fa-angle-down fa-2x"></i></a></a></div> | |
<?php //the_posts_navigation(); ?> | |
<?php else : ?> | |
<?php get_template_part( 'template-parts/content', 'none' ); ?> | |
<?php endif; ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment