3 * The template for displaying search results pages.
6 * @subpackage Twenty_Fifteen
7 * @since Twenty Fifteen 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', 'twentyfifteen' ), get_search_query() ); ?></h1>
19 </header><!-- .page-header -->
23 while ( have_posts() ) : the_post(); ?>
27 * Run the loop for the search to output the results.
28 * If you want to overload this in a child theme then include a file
29 * called content-search.php and that will be used instead.
31 get_template_part( 'content', 'search' );
36 // Previous/next page navigation.
37 the_posts_pagination( array(
38 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
39 'next_text' => __( 'Next page', 'twentyfifteen' ),
40 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
43 // If no content, include the "No posts found" template.
45 get_template_part( 'content', 'none' );
50 </main><!-- .site-main -->
51 </section><!-- .content-area -->
53 <?php get_footer(); ?>