wp/wp-content/themes/twentyfourteen/search.php
changeset 5 5e2f62d02dcd
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
       
     1 <?php
       
     2 /**
       
     3  * The template for displaying Search Results pages
       
     4  *
       
     5  * @package WordPress
       
     6  * @subpackage Twenty_Fourteen
       
     7  * @since Twenty Fourteen 1.0
       
     8  */
       
     9 
       
    10 get_header(); ?>
       
    11 
       
    12 	<section id="primary" class="content-area">
       
    13 		<div id="content" class="site-content" role="main">
       
    14 
       
    15 			<?php if ( have_posts() ) : ?>
       
    16 
       
    17 			<header class="page-header">
       
    18 				<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyfourteen' ), get_search_query() ); ?></h1>
       
    19 			</header><!-- .page-header -->
       
    20 
       
    21 				<?php
       
    22 					// Start the Loop.
       
    23 					while ( have_posts() ) : the_post();
       
    24 
       
    25 						/*
       
    26 						 * Include the post format-specific template for the content. If you want to
       
    27 						 * use this in a child theme, then include a file called called content-___.php
       
    28 						 * (where ___ is the post format) and that will be used instead.
       
    29 						 */
       
    30 						get_template_part( 'content', get_post_format() );
       
    31 
       
    32 					endwhile;
       
    33 					// Previous/next post navigation.
       
    34 					twentyfourteen_paging_nav();
       
    35 
       
    36 				else :
       
    37 					// If no content, include the "No posts found" template.
       
    38 					get_template_part( 'content', 'none' );
       
    39 
       
    40 				endif;
       
    41 			?>
       
    42 
       
    43 		</div><!-- #content -->
       
    44 	</section><!-- #primary -->
       
    45 
       
    46 <?php
       
    47 get_sidebar( 'content' );
       
    48 get_sidebar();
       
    49 get_footer();