3 * The template for displaying search results pages
6 * @subpackage Twenty_Sixteen
7 * @since Twenty Sixteen 1.0
12 <section id="primary" class="content-area">
13 <main id="main" class="site-main" role="main">
15 <?php if ( have_posts() ) : ?>
17 <header class="page-header">
18 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentysixteen' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h1>
19 </header><!-- .page-header -->
23 while ( have_posts() ) : the_post();
26 * Run the loop for the search to output the results.
27 * If you want to overload this in a child theme then include a file
28 * called content-search.php and that will be used instead.
30 get_template_part( 'template-parts/content', 'search' );
35 // Previous/next page navigation.
36 the_posts_pagination( array(
37 'prev_text' => __( 'Previous page', 'twentysixteen' ),
38 'next_text' => __( 'Next page', 'twentysixteen' ),
39 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentysixteen' ) . ' </span>',
42 // If no content, include the "No posts found" template.
44 get_template_part( 'template-parts/content', 'none' );
49 </main><!-- .site-main -->
50 </section><!-- .content-area -->
52 <?php get_sidebar(); ?>
53 <?php get_footer(); ?>