This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
_s/search.php

56 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2012-01-07 03:25:13 +00:00
<?php
/**
2016-09-27 06:22:29 +00:00
* The template for displaying search results pages
2012-01-07 03:25:13 +00:00
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
2012-01-07 03:25:13 +00:00
* @package _s
*/
get_header();
?>
2012-01-07 03:25:13 +00:00
<section id="primary" class="content-area">
<main id="main" class="site-main">
2012-01-07 03:25:13 +00:00
<?php if ( have_posts() ) : ?>
2012-01-07 03:25:13 +00:00
<header class="page-header">
<h1 class="page-title">
<?php
/* translators: %s: search query. */
printf( esc_html__( 'Search Results for: %s', '_s' ), '<span>' . get_search_query() . '</span>' );
?>
</h1>
</header><!-- .page-header -->
2012-01-07 03:25:13 +00:00
<?php
/* Start the Loop */
while ( have_posts() ) :
the_post();
2012-01-07 03:25:13 +00:00
/**
* 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' );
2012-01-07 03:25:13 +00:00
endwhile;
2012-01-07 03:25:13 +00:00
the_posts_navigation();
2012-01-07 03:25:13 +00:00
else :
2012-01-07 03:25:13 +00:00
get_template_part( 'template-parts/content', 'none' );
2012-01-07 03:25:13 +00:00
endif;
?>
2012-01-07 03:25:13 +00:00
</main><!-- #main -->
</section><!-- #primary -->
2012-01-07 03:25:13 +00:00
<?php
get_sidebar();
get_footer();